Skip to content
Snippets Groups Projects
  1. Jan 26, 2012
  2. Jan 11, 2012
  3. Jan 05, 2012
  4. Dec 19, 2011
  5. Dec 15, 2011
    • Uwe Kleine-König's avatar
      ARM: unwinder: fix bisection to find origin in .idx section · ddf5a25c
      Uwe Kleine-König authored
      
      The bisection implemented in unwind_find_origin() stopped to early.  If
      there is only a single entry left to check the original code just took
      the end point as origin which might be wrong.
      
      This was introduced in commit de66a979 ("ARM: 7187/1: fix unwinding
      for XIP kernels").
      
      Reported-and-tested-by: default avatarNick Bowler <nbowler@elliptictech.com>
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ddf5a25c
    • Ian Campbell's avatar
      xen: only limit memory map to maximum reservation for domain 0. · d3db7281
      Ian Campbell authored
      
      d312ae87 "xen: use maximum reservation to limit amount of usable RAM"
      clamped the total amount of RAM to the current maximum reservation. This is
      correct for dom0 but is not correct for guest domains. In order to boot a guest
      "pre-ballooned" (e.g. with memory=1G but maxmem=2G) in order to allow for
      future memory expansion the guest must derive max_pfn from the e820 provided by
      the toolstack and not the current maximum reservation (which can reflect only
      the current maximum, not the guest lifetime max). The existing algorithm
      already behaves this correctly if we do not artificially limit the maximum
      number of pages for the guest case.
      
      For a guest booted with maxmem=512, memory=128 this results in:
       [    0.000000] BIOS-provided physical RAM map:
       [    0.000000]  Xen: 0000000000000000 - 00000000000a0000 (usable)
       [    0.000000]  Xen: 00000000000a0000 - 0000000000100000 (reserved)
      -[    0.000000]  Xen: 0000000000100000 - 0000000008100000 (usable)
      -[    0.000000]  Xen: 0000000008100000 - 0000000020800000 (unusable)
      +[    0.000000]  Xen: 0000000000100000 - 0000000020800000 (usable)
      ...
       [    0.000000] NX (Execute Disable) protection: active
       [    0.000000] DMI not present or invalid.
       [    0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
       [    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
      -[    0.000000] last_pfn = 0x8100 max_arch_pfn = 0x1000000
      +[    0.000000] last_pfn = 0x20800 max_arch_pfn = 0x1000000
       [    0.000000] initial memory mapped : 0 - 027ff000
       [    0.000000] Base memory trampoline at [c009f000] 9f000 size 4096
      -[    0.000000] init_memory_mapping: 0000000000000000-0000000008100000
      -[    0.000000]  0000000000 - 0008100000 page 4k
      -[    0.000000] kernel direct mapping tables up to 8100000 @ 27bb000-27ff000
      +[    0.000000] init_memory_mapping: 0000000000000000-0000000020800000
      +[    0.000000]  0000000000 - 0020800000 page 4k
      +[    0.000000] kernel direct mapping tables up to 20800000 @ 26f8000-27ff000
       [    0.000000] xen: setting RW the range 27e8000 - 27ff000
       [    0.000000] 0MB HIGHMEM available.
      -[    0.000000] 129MB LOWMEM available.
      -[    0.000000]   mapped low ram: 0 - 08100000
      -[    0.000000]   low ram: 0 - 08100000
      +[    0.000000] 520MB LOWMEM available.
      +[    0.000000]   mapped low ram: 0 - 20800000
      +[    0.000000]   low ram: 0 - 20800000
      
      With this change "xl mem-set <domain> 512M" will successfully increase the
      guest RAM (by reducing the balloon).
      
      There is no change for dom0.
      
      Reported-and-Tested-by: default avatarGeorge Shuklin <george.shuklin@gmail.com>
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Cc: stable@kernel.org
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      d3db7281
  6. Dec 14, 2011
  7. Dec 13, 2011
  8. Dec 12, 2011
  9. Dec 11, 2011
  10. Dec 10, 2011
    • Matt Fleming's avatar
      x86, efi: Make efi_call_phys_{prelog,epilog} CONFIG_RELOCATABLE-aware · 6d3e32e6
      Matt Fleming authored
      
      efi_call_phys_prelog() sets up a 1:1 mapping of the physical address
      range in swapper_pg_dir. Instead of replacing then restoring entries
      in swapper_pg_dir we should be using initial_page_table which already
      contains the 1:1 mapping.
      
      It's safe to blindly switch back to swapper_pg_dir in the epilog
      because the physical EFI routines are only called before
      efi_enter_virtual_mode(), e.g. before any user processes have been
      forked. Therefore, we don't need to track which pgd was in %cr3 when
      we entered the prelog.
      
      The previous code actually contained a bug because it assumed that the
      kernel was loaded at a physical address within the first 8MB of ram,
      usually at 0x100000. However, this isn't the case with a
      CONFIG_RELOCATABLE=y kernel which could have been loaded anywhere in
      the physical address space.
      
      Also delete the ancient (and bogus) comments about the page table
      being restored after the lock is released. There is no locking.
      
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Darrent Hart <dvhart@linux.intel.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Link: http://lkml.kernel.org/r/1323346250.3894.74.camel@mfleming-mobl1.ger.corp.intel.com
      
      
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      6d3e32e6
  11. Dec 09, 2011
    • Youquan Song's avatar
      thp: add compound tail page _mapcount when mapped · b6999b19
      Youquan Song authored
      
      With the 3.2-rc kernel, IOMMU 2M pages in KVM works.  But when I tried
      to use IOMMU 1GB pages in KVM, I encountered an oops and the 1GB page
      failed to be used.
      
      The root cause is that 1GB page allocation calls gup_huge_pud() while 2M
      page calls gup_huge_pmd.  If compound pages are used and the page is a
      tail page, gup_huge_pmd() increases _mapcount to record tail page are
      mapped while gup_huge_pud does not do that.
      
      So when the mapped page is relesed, it will result in kernel oops
      because the page is not marked mapped.
      
      This patch add tail process for compound page in 1GB huge page which
      keeps the same process as 2M page.
      
      Reproduce like:
      1. Add grub boot option: hugepagesz=1G hugepages=8
      2. mount -t hugetlbfs -o pagesize=1G hugetlbfs /dev/hugepages
      3. qemu-kvm -m 2048 -hda os-kvm.img -cpu kvm64 -smp 4 -mem-path /dev/hugepages
      	-net none -device pci-assign,host=07:00.1
      
        kernel BUG at mm/swap.c:114!
        invalid opcode: 0000 [#1] SMP
        Call Trace:
          put_page+0x15/0x37
          kvm_release_pfn_clean+0x31/0x36
          kvm_iommu_put_pages+0x94/0xb1
          kvm_iommu_unmap_memslots+0x80/0xb6
          kvm_assign_device+0xba/0x117
          kvm_vm_ioctl_assigned_device+0x301/0xa47
          kvm_vm_ioctl+0x36c/0x3a2
          do_vfs_ioctl+0x49e/0x4e4
          sys_ioctl+0x5a/0x7c
          system_call_fastpath+0x16/0x1b
        RIP  put_compound_page+0xd4/0x168
      
      Signed-off-by: default avatarYouquan Song <youquan.song@intel.com>
      Reviewed-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b6999b19
    • Shawn Guo's avatar
      arm/imx: fix power button on imx51 babbage board · 847a2ee7
      Shawn Guo authored
      
      Since commit 6571534b (plat-mxc: iomux-v3.h: implicitly enable
      pull-up/down when that's desired) was in, the power button on imx51
      babbage board stopped working because it's pulled up by mistake.
      The patch removes the pull-up setting from the pad configuration for
      that gpio to make the power button back to work.
      
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      847a2ee7
    • Richard Zhao's avatar
      ARM: imx: fix cpufreq build errors · 300a47b4
      Richard Zhao authored
      
        CC      arch/arm/plat-mxc/cpufreq.o
      arch/arm/plat-mxc/cpufreq.c:203: error: expected declaration specifiers or '...' before string constant
      arch/arm/plat-mxc/cpufreq.c:203: warning: data definition has no type or storage class
      arch/arm/plat-mxc/cpufreq.c:203: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
      arch/arm/plat-mxc/cpufreq.c:203: warning: function declaration isn't a prototype
      arch/arm/plat-mxc/cpufreq.c:204: error: expected declaration specifiers or '...' before string constant
      arch/arm/plat-mxc/cpufreq.c:204: warning: data definition has no type or storage class
      arch/arm/plat-mxc/cpufreq.c:204: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
      arch/arm/plat-mxc/cpufreq.c:204: warning: function declaration isn't a prototype
      arch/arm/plat-mxc/cpufreq.c:205: error: expected declaration specifiers or '...' before string constant
      arch/arm/plat-mxc/cpufreq.c:205: warning: data definition has no type or storage class
      arch/arm/plat-mxc/cpufreq.c:205: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
      arch/arm/plat-mxc/cpufreq.c:205: warning: function declaration isn't a prototype
      make[1]: *** [arch/arm/plat-mxc/cpufreq.o] Error 1
      make: *** [arch/arm/plat-mxc] Error 2
      
      Signed-off-by: default avatarRichard Zhao <richard.zhao@freescale.com>
      Signed-off-by: default avatarRichard Zhao <richard.zhao@linaro.org>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      300a47b4
    • Dong Aisheng's avatar
    • Jason Chen's avatar
      MXC PWM: should active during DOZE/WAIT/DBG mode · c0d96aed
      Jason Chen authored
      
      Signed-off-by: default avatarJason Chen <jason.chen@linaro.org>
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Cc: stable@kernel.org
      c0d96aed
    • Matt Fleming's avatar
      x86, efi: Calling __pa() with an ioremap()ed address is invalid · e8c71062
      Matt Fleming authored
      If we encounter an efi_memory_desc_t without EFI_MEMORY_WB set
      in ->attribute we currently call set_memory_uc(), which in turn
      calls __pa() on a potentially ioremap'd address.
      
      On CONFIG_X86_32 this is invalid, resulting in the following
      oops on some machines:
      
        BUG: unable to handle kernel paging request at f7f22280
        IP: [<c10257b9>] reserve_ram_pages_type+0x89/0x210
        [...]
      
        Call Trace:
         [<c104f8ca>] ? page_is_ram+0x1a/0x40
         [<c1025aff>] reserve_memtype+0xdf/0x2f0
         [<c1024dc9>] set_memory_uc+0x49/0xa0
         [<c19334d0>] efi_enter_virtual_mode+0x1c2/0x3aa
         [<c19216d4>] start_kernel+0x291/0x2f2
         [<c19211c7>] ? loglevel+0x1b/0x1b
         [<c19210bf>] i386_start_kernel+0xbf/0xc8
      
      A better approach to this problem is to map the memory region
      with the correct attributes from the start, instead of modifying
      it after the fact. The uncached case can be handled by
      ioremap_nocache() and the cached by ioremap_cache().
      
      Despite first impressions, it's not possible to use
      ioremap_cache() to map all cached memory regions on
      CONFIG_X86_64 because EFI_RUNTIME_SERVICES_DATA regions really
      don't like being mapped into the vmalloc space, as detailed in
      the following bug report,
      
      	https://bugzilla.redhat.com/show_bug.cgi?id=748516
      
      
      
      Therefore, we need to ensure that any EFI_RUNTIME_SERVICES_DATA
      regions are covered by the direct kernel mapping table on
      CONFIG_X86_64. To accomplish this we now map E820_RESERVED_EFI
      regions via the direct kernel mapping with the initial call to
      init_memory_mapping() in setup_arch(), whereas previously these
      regions wouldn't be mapped if they were after the last E820_RAM
      region until efi_ioremap() was called. Doing it this way allows
      us to delete efi_ioremap() completely.
      
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Huang Ying <huang.ying.caritas@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/1321621751-3650-1-git-send-email-matt@console-pimps.org
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e8c71062
  12. Dec 08, 2011
  13. Dec 06, 2011
  14. Dec 05, 2011
Loading