Skip to content
  1. May 09, 2013
    • Chris Zankel's avatar
      xtensa: fix redboot load address · a078ccff
      Chris Zankel authored
      
      
      With the patch to support MMUv3, the base address for the loaded
      binary image has changed, and a fix was applied to the U-Boot image.
      This fixes the RedBoot image.
      
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      a078ccff
    • Max Filippov's avatar
      xtensa: ISS: fix timer_lock usage in rs_open · efefbcc5
      Max Filippov authored
      
      
      This fixes the following lockdep splat:
      
      [   66.460000] =================================
      [   66.460000] [ INFO: inconsistent lock state ]
      [   66.460000] 3.9.0-rc5-00161-ga48dd49 #4 Not tainted
      [   66.460000] ---------------------------------
      [   66.460000] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
      [   66.460000] swapper/1 [HC0[0]:SC1[1]:HE1:SE0] takes:
      [   66.460000]  (timer_lock){+.?...}, at: [<d0006cde>] rs_poll+0x12/0xdc
      [   66.460000] {SOFTIRQ-ON-W} state was registered at:
      [   66.460000]   [<d00421f0>] lock_acquire+0xec/0x13c
      [   66.460000]   [<d01ea036>] _raw_spin_lock+0x3a/0x84
      [   66.460000]   [<d0006c8c>] rs_open+0x18/0x58
      [   66.460000]   [<d0139ea2>] tty_open+0x262/0x3cc
      [   66.460000]   [<d00942e0>] chrdev_open+0x8c/0xe0
      [   66.460000]   [<d00907b2>] do_dentry_open$isra$16+0x10e/0x190
      [   66.460000]   [<d0091141>] finish_open+0x39/0x48
      [   66.460000]   [<d009a0b4>] do_last$isra$34+0x6c4/0x824
      [   66.460000]   [<d009a27a>] path_openat+0x66/0x310
      [   66.460000]   [<d009a53a>] do_filp_open+0x16/0x44
      [   66.460000]   [<d0091445>] do_sys_open+0xd5/0x13c
      [   66.460000]   [<d00914be>] sys_open+0x12/0x18
      [   66.460000]   [<d0413ffc>] kernel_init_freeable+0xe4/0x12c
      [   66.460000]   [<d01e2a9c>] kernel_init+0xc/0x9c
      [   66.460000]   [<d00044fc>] ret_from_kernel_thread+0x8/0xc
      [   66.460000] irq event stamp: 132542
      [   66.460000] hardirqs last  enabled at (132542): [<d01ea2ec>] _raw_spin_unlock_irq+0x30/0x44
      [   66.460000] hardirqs last disabled at (132541): [<d01ea11e>] _raw_spin_lock_irq+0xe/0x8c
      [   66.460000] softirqs last  enabled at (132234): [<d0017d32>] __do_softirq+0x216/0x2a4
      [   66.460000] softirqs last disabled at (132539): [<d0018024>] irq_exit+0x38/0x40
      [   66.460000]
      [   66.460000] other info that might help us debug this:
      [   66.460000]  Possible unsafe locking scenario:
      [   66.460000]
      [   66.460000]        CPU0
      [   66.460000]        ----
      [   66.460000]   lock(timer_lock);
      [   66.460000]   <Interrupt>
      [   66.460000]     lock(timer_lock);
      [   66.460000]
      [   66.460000]  *** DEADLOCK ***
      [   66.460000]
      [   66.460000] 1 lock held by swapper/1:
      [   66.460000]  #0:  (((&serial_timer))){+.-...}, at: [<d001c65c>] call_timer_fn+0x0/0x1f0
      [   66.460000]
      Stack: d7c2fac0 00000018 00000004 00000001 d7c2faa0 00000004 00000006 d7c2fa90
             9003e87c d7c2fae0 d7c30000 d025a87c 00000001 0000000f 00000000 d7c2fac0
             9004005d d7c2fb10 d7c30000 d7c30338 00000001 00000001 00000000 d7c30338
      [   66.460000] Call Trace:
      [   66.460000]  [<d01e4f93>] print_usage_bug$part$26+0x1c3/0x1c8
      [   66.460000]  [<d003e87c>] mark_lock+0x2b4/0x440
      [   66.460000]  [<d004005d>] __lock_acquire+0x54d/0x16c4
      [   66.460000]  [<d00421f0>] lock_acquire+0xec/0x13c
      [   66.460000]  [<d01ea036>] _raw_spin_lock+0x3a/0x84
      [   66.460000]  [<d0006cde>] rs_poll+0x12/0xdc
      [   66.460000]  [<d001c71a>] call_timer_fn+0xbe/0x1f0
      [   66.460000]  [<d001cd90>] run_timer_softirq+0x198/0x1f4
      [   66.460000]  [<d0017c30>] __do_softirq+0x114/0x2a4
      [   66.460000]  [<d0018024>] irq_exit+0x38/0x40
      [   66.460000]  [<d00046c0>] do_IRQ+0x44/0x48
      [   66.460000]  [<d0005c58>] do_interrupt+0x4c/0x54
      [   66.460000]  [<d0003c80>] common_exception_return+0x0/0x5c
      [   66.460000]  [<d006682c>] free_pcppages_bulk+0x254/0x308
      [   66.460000]
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      efefbcc5
    • Max Filippov's avatar
      xtensa: disable IRQs while IRQ handler is running · 895666a9
      Max Filippov authored
      IRQ handlers are expected to run with IRQs disabled.
      See e.g. http://lwn.net/Articles/380931/ for a longer story.
      
      This was overlooked in the commit
        2d1c645c
      
       xtensa: dispatch medium-priority interrupts
      Revert to old behavior and simplify interrupt entry and exit code.
      Interrupt handler still honours IRQ priority.
      
      do_notify_resume/schedule must be called with interrupts enabled, enable
      interrupts if we return from user exception.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      895666a9
    • Max Filippov's avatar
      xtensa: enable lockdep support · 8f371c75
      Max Filippov authored
      
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      8f371c75
    • Max Filippov's avatar
      xtensa: fix arch_irqs_disabled_flags implementation · 031d0112
      Max Filippov authored
      
      
      IRQs are disabled when PS.EXCM is set or PS.INTLEVEL is equal to or
      higher than LOCKLEVEL.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      031d0112
    • Max Filippov's avatar
      xtensa: add irq flags trace support · c92931b2
      Max Filippov authored
      
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      c92931b2
    • Max Filippov's avatar
      xtensa: provide custom CALLER_ADDR* implementations · 3ae908c9
      Max Filippov authored
      
      
      Definition of CALLER_ADDR* through __builtin_return_address makes
      compiler insert calls to __xtensa_libgcc_window_spill, which in turn
      makes fast_syscall_spill_registers syscall that clobbers registers when
      called from the kernel mode, leading to invalid opcode exceptions on
      return to userspace.
      
      Provide definition for CALLER_ADDR0 as MAKE_PC_FROM_RA(a0, a1) and in
      case CONFIG_FRAME_POINTER is enabled extract CALLER_ADDR{1-3} from
      stack.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      3ae908c9
    • Max Filippov's avatar
      xtensa: add stacktrace support · 3e4196a5
      Max Filippov authored
      
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      3e4196a5
    • Max Filippov's avatar
      xtensa: clean up stpill_registers · 4e96274e
      Max Filippov authored
      
      
      - remove unused asm parameters;
      - fix EXCM bit setting in the PS SR during _spill_registers call.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      4e96274e
    • Max Filippov's avatar
      xtensa: don't use a7 in simcalls · f4b93ba9
      Max Filippov authored
      
      
      To support FRAME_POINTER avoid using a7 in __simc (none of the existing
      simcalls needs it). Replace calls to __simc with more specific
      simc_read, simc_write and simc_lseek calls.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      f4b93ba9
    • Max Filippov's avatar
      0f7f9310
    • Max Filippov's avatar
      xtensa: provide default platform_pcibios_init implementation · b06c14e5
      Max Filippov authored
      
      
      This fixes the following build error:
      
        arch/xtensa/kernel/built-in.o:(.init.literal+0xe8): undefined reference
      	to `platform_pcibios_init'
        arch/xtensa/kernel/built-in.o: In function `setup_arch':
        (.init.text+0x20e): undefined reference to `platform_pcibios_init'
      
      and allows platform to omit definition of platform_pcibios_init if it's
      empty.
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      b06c14e5
    • Paul Bolle's avatar
      xtensa: remove KCORE_ELF again · 5e44fd01
      Paul Bolle authored
      
      
      The Kconfig symbol KCORE_ELF was removed in v2.6.0, but reappeared in two
      architectures. It is useless. Remove it again.
      
      Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      5e44fd01
    • Max Filippov's avatar
      xtensa: document MMUv3 setup sequence · 93e294ac
      Max Filippov authored
      
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      93e294ac
    • Max Filippov's avatar
      xtensa: add MMU v3 support · e85e335f
      Max Filippov authored
      
      
      MMUv3 comes out of reset with identity vaddr -> paddr mapping in the TLB
      way 6:
      
      Way 6 (512 MB)
              Vaddr       Paddr       ASID  Attr RWX Cache
              ----------  ----------  ----  ---- --- -------
              0x00000000  0x00000000  0x01  0x03 RWX Bypass
              0x20000000  0x20000000  0x01  0x03 RWX Bypass
              0x40000000  0x40000000  0x01  0x03 RWX Bypass
              0x60000000  0x60000000  0x01  0x03 RWX Bypass
              0x80000000  0x80000000  0x01  0x03 RWX Bypass
              0xa0000000  0xa0000000  0x01  0x03 RWX Bypass
              0xc0000000  0xc0000000  0x01  0x03 RWX Bypass
              0xe0000000  0xe0000000  0x01  0x03 RWX Bypass
      
      This patch adds remapping code at the reset vector or at the kernel
      _start (depending on CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX) that
      reconfigures MMUv3 as MMUv2:
      
      Way 5 (128 MB)
              Vaddr       Paddr       ASID  Attr RWX Cache
              ----------  ----------  ----  ---- --- -------
              0xd0000000  0x00000000  0x01  0x07 RWX WB
              0xd8000000  0x00000000  0x01  0x03 RWX Bypass
      Way 6 (256 MB)
              Vaddr       Paddr       ASID  Attr RWX Cache
              ----------  ----------  ----  ---- --- -------
              0xe0000000  0xf0000000  0x01  0x07 RWX WB
              0xf0000000  0xf0000000  0x01  0x03 RWX Bypass
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      e85e335f
    • Max Filippov's avatar
      xtensa: fix ibreakenable register update · d83ff0bb
      Max Filippov authored
      
      
      Only set the register when there is at least one ibreak register,
      otherwise the build fails:
      	arch/xtensa/kernel/head.S:105: Error: invalid register 'ibreakenable'
      	for 'wsr' instruction
      	arch/xtensa/platforms/iss/setup.c:67: Error: invalid register
      	'ibreakenable' for 'wsr' instruction
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      d83ff0bb
    • Max Filippov's avatar
      xtensa: fix oprofile building as module · 74f5bf02
      Max Filippov authored
      
      
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarChris Zankel <chris@zankel.net>
      74f5bf02
  2. Apr 29, 2013
  3. Apr 28, 2013
  4. Apr 27, 2013
    • Olof Johansson's avatar
      Merge tag 'omap-for-v3.9-rc6/fixes-signed' of... · d21be237
      Olof Johansson authored
      
      Merge tag 'omap-for-v3.9-rc6/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      From Tony Lindgren:
      One MUSB regression fix that I forgot to send earlier. Without
      this MUSB no longer works on omap4 based devices.
      
      * tag 'omap-for-v3.9-rc6/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: OMAP4: hwmod data: make 'ocp2scp_usb_phy_phy_48m" as the main clock
      
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      d21be237
  5. Apr 26, 2013
    • Linus Torvalds's avatar
      Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · d7d7271f
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
       "Two driver fixes.
      
        One avoids reading any file at a system with a cx25821 board
        (fortunately, this is not a common device).  The other one prevents
        reading after a buffer with ISDB-T devices based on mb86a20s."
      
      * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] cx25821: do not expose broken video output streams
        [media] mb86a20s: Fix estimate_rate setting
      d7d7271f
    • Linus Torvalds's avatar
      Merge branch 'fixes-3.9-late' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 96edcf31
      Linus Torvalds authored
      Pull late parisc fixes from Helge Deller:
       "I know it's *very* late in the 3.9 release cycle, but since there
        aren't that many people testing the parisc linux kernel, a few (for
        our port) critical issues just showed up a few days back for the first
        time.
      
        What's in it?
         - add missing __ucmpdi2 symbol, which is required for btrfs on 32bit
           kernel.
         - change kunmap() macro to static inline function.  This fixes a
           debian/gcc-4.4 build error.
         - add locking when doing PTE updates.  This fixes random userspace
           crashes.
         - disable (optional) -mlong-calls compiler option for modules, else
           modules can't be loaded at runtime.
         - a smart patch by Will Deacon which fixes 64bit put_user() warnings
           on 32bit kernel."
      
      * 'fixes-3.9-late' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates
        parisc: disable -mlong-calls compiler option for kernel modules
        parisc: uaccess: fix compiler warnings caused by __put_user casting
        parisc: Change kunmap macro to static inline function
        parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds.
      96edcf31
    • Matt Fleming's avatar
      efivars: only check for duplicates on the registered list · f464246d
      Matt Fleming authored
      
      
      variable_is_present() accesses '__efivars' directly, but when called via
      gsmi_init() Michel reports observing the following crash,
      
        BUG: unable to handle kernel NULL pointer dereference at (null)
        IP: variable_is_present+0x55/0x170
        Call Trace:
          register_efivars+0x106/0x370
          gsmi_init+0x2ad/0x3da
          do_one_initcall+0x3f/0x170
      
      The reason for the crash is that '__efivars' hasn't been initialised nor
      has it been registered with register_efivars() by the time the google
      EFI SMI driver runs.  The gsmi code uses its own struct efivars, and
      therefore, a different variable list.  Fix the above crash by passing
      the registered struct efivars to variable_is_present(), so that we
      traverse the correct list.
      
      Reported-by: default avatarMichel Lespinasse <walken@google.com>
      Tested-by: default avatarMichel Lespinasse <walken@google.com>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Matthew Garrett <matthew.garrett@nebula.com>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f464246d
    • Jiri Slaby's avatar
      TTY: fix atime/mtime regression · 37b7f3c7
      Jiri Slaby authored
      In commit b0de59b5
      
       ("TTY: do not update atime/mtime on read/write")
      we removed timestamps from tty inodes to fix a security issue and waited
      if something breaks.  Well, 'w', the utility to find out logged users
      and their inactivity time broke.  It shows that users are inactive since
      the time they logged in.
      
      To revert to the old behaviour while still preventing attackers to
      guess the password length, we update the timestamps in one-minute
      intervals by this patch.
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      37b7f3c7
    • Zhao Hongjiang's avatar
      aio: fix possible invalid memory access when DEBUG is enabled · 91d80a84
      Zhao Hongjiang authored
      
      
      dprintk() shouldn't access @ring after it's unmapped.
      
      Signed-off-by: default avatarZhao Hongjiang <zhaohongjiang@huawei.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      91d80a84
    • H. Peter Anvin's avatar
      Merge tag 'efi-urgent' into x86/urgent · 697dfd88
      H. Peter Anvin authored
      
      
       * The EFI variable anti-bricking algorithm merged in -rc8 broke booting
         on some Apple machines because they implement EFI spec 1.10, which
         doesn't provide a QueryVariableInfo() runtime function and the logic
         used to check for the existence of that function was insufficient.
         Fix from Josh Boyer.
      
       * The anti-bricking algorithm also introduced a compiler warning on
         32-bit. Fix from Borislav Petkov.
      
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      697dfd88
    • John David Anglin's avatar
      parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates · bda079d3
      John David Anglin authored
      
      
      User applications running on SMP kernels have long suffered from instability
      and random segmentation faults.  This patch improves the situation although
      there is more work to be done.
      
      One of the problems is the various routines in pgtable.h that update page table
      entries use different locking mechanisms, or no lock at all (set_pte_at).  This
      change modifies the routines to all use the same lock pa_dbit_lock.  This lock
      is used for dirty bit updates in the interruption code. The patch also purges
      the TLB entries associated with the PTE to ensure that inconsistent values are
      not used after the page table entry is updated.  The UP and SMP code are now
      identical.
      
      The change also includes a minor update to the purge_tlb_entries function in
      cache.c to improve its efficiency.
      
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      bda079d3
    • Helge Deller's avatar
      parisc: disable -mlong-calls compiler option for kernel modules · cf71130d
      Helge Deller authored
      CONFIG_MLONGCALLS was introduced in commit
      ec758f98
      
       to overcome linker issues when linking
      huge linux kernels, e.g. with many modules linked in.
      
      But in the kernel module loader there is no support yet for the new relocation
      types, which is why modules built with -mlong-calls can't be loaded.
      Furthermore, for modules long calls are not really necessary, since we already
      use stub sections which resolve long distance calls.
      
      So, let's just disable this compiler option when compiling kernel modules.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      cf71130d
    • Will Deacon's avatar
      parisc: uaccess: fix compiler warnings caused by __put_user casting · 0f28b628
      Will Deacon authored
      
      
      When targetting 32-bit processors, __put_user emits a pair of stw
      instructions for the 8-byte case. If the type of __val is a pointer, the
      marshalling code casts it to the wider integer type of u64, resulting
      in the following compiler warnings:
      
        kernel/signal.c: In function 'copy_siginfo_to_user':
        kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
        [...]
      
      This patch fixes the warnings by removing the marshalling code and using
      the correct output modifiers in the __put_{user,kernel}_asm64 macros
      so that GCC will allocate the right registers without the need to
      extract the two words explicitly.
      
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      0f28b628
    • John David Anglin's avatar
      parisc: Change kunmap macro to static inline function · 87be2f88
      John David Anglin authored
      
      
      Change kunmap macro to static inline function to fix build error
      compiling drivers/base/dma-buf.c.
      
      Without the change, the following error can occur:
      
         CC      drivers/base/dma-buf.o
      drivers/base/dma-buf.c: In function 'dma_buf_kunmap':
      drivers/base/dma-buf.c:427:46:
      error: macro "kunmap" passed 3 arguments, but takes just 1
      
      I believe parisc is the only arch to implement kunmap using a macro.
      
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      87be2f88
    • John David Anglin's avatar
      parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds. · ca0ad83d
      John David Anglin authored
      
      
      The Debian experimental linux source package (3.8.5-1) build fails
      with the following errors:
      ...
      MODPOST 2016 modules
      ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
      ERROR: "__ucmpdi2" [drivers/md/dm-verity.ko] undefined!
      
      The attached patch resolves this problem.  It is based on the s390
      implementation of ucmpdi2.c.
      
      Signed-off-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ca0ad83d
  6. Apr 25, 2013
  7. Apr 24, 2013
    • Josh Boyer's avatar
      efi: Check EFI revision in setup_efi_vars · f697036b
      Josh Boyer authored
      
      
      We need to check the runtime sys_table for the EFI version the firmware
      specifies instead of just checking for a NULL QueryVariableInfo.  Older
      implementations of EFI don't have QueryVariableInfo but the runtime is
      a smaller structure, so the pointer to it may be pointing off into garbage.
      
      This is apparently the case with several Apple firmwares that support EFI
      1.10, and the current check causes them to no longer boot.  Fix based on
      a suggestion from Matthew Garrett.
      
      Signed-off-by: default avatarJosh Boyer <jwboyer@redhat.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      f697036b
    • Borislav Petkov's avatar
      x86, efi: Fix a build warning · 51f8fbba
      Borislav Petkov authored
      Fix this:
      
      arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_vars’:
      arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ‘efi_call_phys’ makes pointer from integer without a cast [enabled by default]
      In file included from arch/x86/boot/compressed/eboot.c:12:0:
      /w/kernel/linux/arch/x86/include/asm/efi.h:8:33: note: expected ‘void *’ but argument is of type ‘long unsigned int’
      
      after cc5a080c
      
       ("efi: Pass boot services variable info to runtime
      code").
      
      Reported-by: default avatarPaul Bolle <pebolle@tiscali.nl>
      Cc: Matthew Garrett <matthew.garrett@nebula.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      51f8fbba
  8. Apr 23, 2013