28 Apr, 2008

33 commits

  • Add platform code to support Freescale DIU. The platform code includes
    framebuffer memory allocation, pixel format, monitor port, etc.

    Signed-off-by: York Sun
    Signed-off-by: Timur Tabi
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    York Sun
     
  • The following features are supported:
    plane 0 works as a regular frame buffer, can be accessed by /dev/fb0
    plane 1 has two AOIs (area of interest), can be accessed by /dev/fb1 and /dev/fb2
    plane 2 has two AOIs, can be accessed by /dev/fb3 and /dev/fb4
    Special ioctls support AOIs

    All /dev/fb* can be used as regular frame buffer devices, except hardware
    change can only be made through /dev/fb0. Changing pixel clock has no effect
    on other fbs.

    Limitation of usage of AOIs:
    AOIs on the same plane can not be horizonally overlapped
    AOIs have horizonal order, i.e. AOI0 should be always on top of AOI1
    AOIs can not beyond phisical display area. Application should check AOI geometry
    before changing physical resolution on /dev/fb0

    required command line parameters to preallocate memory for frame buffer diufb.

    optional command line parameters to set modes and monitor
    video=fslfb:[resolution][,bpp][,monitor]
    Syntax:

    Resolution
    xres x yres-bpp@refresh_rate, the -bpp and @refresh_rate are optional
    eg, 1024x768, 1280x1024, 1280x1024-32, 1280x1024@60, 1280x1024-32@60, 1280x480-32@60

    Bpp
    bpp=32, bpp=24, or bpp=16

    Monitor
    monitor=0, monitor=1, monitor=2
    0 is DVI
    1 is Single link LVDS
    2 is Double link LVDS

    Note: switching monitor is a board feather, not DIU feather. MPC8610HPCD has three
    monitor ports to swtich to. MPC5121ADS doesn't have additional monitor port. So switching
    monirot port for MPC5121ADS has no effect.

    If compiled as a module, it takes pamameters mode, bpp, monitor with the same syntax above.

    Signed-off-by: York Sun
    Signed-off-by: Timur Tabi
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    York Sun
     
  • If the user specified a fixed framebuffer address on the command line, it may
    have been initialized already with a splash image or something, so we
    shouldn't clear it.

    Therefore, we should only initialize the framebuffer if we allocated it
    ourselves. This patch also updates the AVR32 setup code to clear the
    framebuffer if it allocated it itself, i.e. the user didn't provide a fixed
    address or the reservation failed.

    I've updated the at91 platform code as well so that it initializes the
    framebuffer if it is located in SRAM, but I haven't tested that it actually
    works.

    Signed-off-by: Haavard Skinnemoen
    Cc: "Antonino A. Daplas"
    Cc: Nicolas FERRE
    Cc: Andrew Victor
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Haavard Skinnemoen
     
  • This cleans up a few MSR-using drivers in the following manner:
    - Ensures MSRs are all defined in asm/geode.h, rather than in misc
    places
    - Makes the naming consistent; cs553[56] ones begin with MSR_,
    GX-specific ones start with MSR_GX_, and LX-specific ones start
    with MSR_LX_. Also, make the names match the data sheet.
    - Use MSR names rather than numbers in source code
    - Document the fact that the LX's MSR_PADSEL has the wrong value
    in the data sheet. That's, uh, good to note.

    Signed-off-by: Andres Salomon
    Acked-by: Jordan Crouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andres Salomon
     
  • Turn CONFIG_DMI into a selectable option if EMBEDDED is defined, in
    order to be able to remove the DMI table scanning code if it's not
    needed, and then reduce the kernel code size.

    With CONFIG_DMI (i.e before) :

    text data bss dec hex filename
    1076076 128656 98304 1303036 13e1fc vmlinux

    Without CONFIG_DMI (i.e after) :

    text data bss dec hex filename
    1068092 126308 98304 1292704 13b9a0 vmlinux

    Result:

    text data bss dec hex filename
    -7984 -2348 0 -10332 -285c vmlinux

    The new option appears in "Processor type and features", only when
    CONFIG_EMBEDDED is defined.

    This patch is part of the Linux Tiny project, and is based on previous work
    done by Matt Mackall .

    Signed-off-by: Thomas Petazzoni
    Acked-by: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Anvin"
    Signed-off-by: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Petazzoni
     
  • Add VR41xx SIU setup for serial console.

    Signed-off-by: Yoichi Yuasa
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoichi Yuasa
     
  • Make some global functions and variables static.

    And remove some useless declarations for local functions, since we just need
    to move their definitions ahead.

    [jdike@addtoit.com: checkpatch cleanups]
    Signed-off-by: WANG Cong
    Signed-off-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Improve this code a bit: check sigaction's return value and remove a useless
    fflush().

    Acked-by: Jeff Dike
    Signed-off-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Make several things static, because they no longer need to be global.

    Acked-by: Jeff Dike
    Signed-off-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Make the following three functions static, since they don't need to be global.

    arch/um/drivers/mcast_kern.c::mcast_setup()
    arch/um/drivers/mconsole_user.c::mconsole_reply_v0()
    arch/um/drivers/port_user.c::port_pre_exec()

    Acked-by: Jeff Dike
    Signed-off-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • arch/um/drivers/chan_kern.c::chan_out_fd() is not used by anyone. Remove it.

    Acked-by: Jeff Dike
    Signed-off-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • arch/um/drivers/chan_kern.c::open_chan() can become static.

    Acked-by: Jeff Dike
    Signed-off-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • - lets ptrace_child become void
    - adds checking for the return value of change_sig
    - moves errors info into stderr instead of stdout.

    Cc: Jeff Dike
    Signed-off-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • Make some small improvements for arch/um/kernel/um_arch.c.

    Signed-off-by: WANG Cong
    Acked-by: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • show_mem() has no need to print the amount of free swap space manually because
    show_free_areas() does this already and is called by the former.

    The two outputs only differ in text formatting:

    printk("Free swap = %lukB\n", ...);
    printk("Free swap: %6ldkB\n", ...);

    Signed-off-by: Johannes Weiner
    Cc: Mikael Starvik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • __FUNCTION__ is gcc-specific, use __func__

    Signed-off-by: Harvey Harrison
    Cc: Geert Uytterhoeven
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • show_mem() has no need to print the amount of free swap space manually because
    show_free_areas() does this already and is called by the former.

    The two outputs only differ in text formatting:

    printk("Free swap = %lukB\n", ...);
    printk("Free swap: %6ldkB\n", ...);

    Signed-off-by: Johannes Weiner
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • The functions time_before, time_before_eq, time_after, and time_after_eq are
    more robust for comparing jiffies against other values.

    So implement usage of the time_after() macro, defined in linux/jiffies.h,
    which deals with wrapping correctly

    [akpm@linux-foundation.org: fix warning]
    Signed-off-by: S.Caglar Onur
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    S.Caglar Onur
     
  • __FUNCTION__ is gcc-specific, use __func__

    The change in pci-iommu,c should be safe as arena has not been assigned
    when we get to this point.

    Some were within #if 0 blocks, have changed them and left the blocks
    as they appear to be debugging infrastructure.

    A #define FN __FUNCTION__ was removed and occurances of FN were replaced
    with __func__ as well.

    Signed-off-by: Harvey Harrison
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • arch/alpha/kernel/module.c (module_frob_arch_sections): Handle kcalloc failure.

    Signed-off-by: Jim Meyering
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Meyering
     
  • Alter the block device ->direct_access() API to work with the new
    get_xip_mem() API (that requires both kaddr and pfn are returned).

    Some architectures will not do the right thing in their virt_to_page() for use
    by XIP (to translate from the kernel virtual address returned by
    direct_access(), to a user mappable pfn in XIP's page fault handler.

    However, we can't switch it to just return the pfn and not the kaddr, because
    we have no good way to get a kva from a pfn, and XIP requires the kva for its
    read(2) and write(2) handlers. So we have to return both.

    Signed-off-by: Jared Hulbert
    Signed-off-by: Nick Piggin
    Cc: Carsten Otte
    Cc: Heiko Carstens
    Cc: linux-mm@kvack.org
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jared Hulbert
     
  • Xen uses bitops to manipulate page flags. Make it use proper page flag
    functions.

    Signed-off-by: Christoph Lameter
    Cc: Andy Whitcroft
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • NR_PAGEFLAGS specifies the number of page flags we are using. From that we
    can calculate the number of bits leftover that can be used for zone, node (and
    maybe the sections id). There is no need anymore for FLAGS_RESERVED if we use
    NR_PAGEFLAGS.

    Use the new methods to make NR_PAGEFLAGS available via the preprocessor.
    NR_PAGEFLAGS is used to calculate field boundaries in the page flags fields.
    These field widths have to be available to the preprocessor.

    Signed-off-by: Christoph Lameter
    Cc: David Miller
    Cc: Andy Whitcroft
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Add the ability to pass comments into asm-offsets.h by generating asm
    output like

    -># comment line

    Mips needs this feature to preserve the comments that are in
    asm-mips/asm-offsets.h right now.

    Then remove the special handling for mips from Kbuild and convert mips to use
    the new string to include the comments.

    Cc: Ralf Baechle
    Signed-off-by: Christoph Lameter
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Add caller information so that /proc/vmallocinfo shows where the allocation
    request for a slice of vmalloc memory originated.

    Results in output like this:

    0xffffc20000000000-0xffffc20000801000 8392704 alloc_large_system_hash+0x127/0x246 pages=2048 vmalloc vpages
    0xffffc20000801000-0xffffc20000806000 20480 alloc_large_system_hash+0x127/0x246 pages=4 vmalloc
    0xffffc20000806000-0xffffc20000c07000 4198400 alloc_large_system_hash+0x127/0x246 pages=1024 vmalloc vpages
    0xffffc20000c07000-0xffffc20000c0a000 12288 alloc_large_system_hash+0x127/0x246 pages=2 vmalloc
    0xffffc20000c0a000-0xffffc20000c0c000 8192 acpi_os_map_memory+0x13/0x1c phys=cff68000 ioremap
    0xffffc20000c0c000-0xffffc20000c0f000 12288 acpi_os_map_memory+0x13/0x1c phys=cff64000 ioremap
    0xffffc20000c10000-0xffffc20000c15000 20480 acpi_os_map_memory+0x13/0x1c phys=cff65000 ioremap
    0xffffc20000c16000-0xffffc20000c18000 8192 acpi_os_map_memory+0x13/0x1c phys=cff69000 ioremap
    0xffffc20000c18000-0xffffc20000c1a000 8192 acpi_os_map_memory+0x13/0x1c phys=fed1f000 ioremap
    0xffffc20000c1a000-0xffffc20000c1c000 8192 acpi_os_map_memory+0x13/0x1c phys=cff68000 ioremap
    0xffffc20000c1c000-0xffffc20000c1e000 8192 acpi_os_map_memory+0x13/0x1c phys=cff68000 ioremap
    0xffffc20000c1e000-0xffffc20000c20000 8192 acpi_os_map_memory+0x13/0x1c phys=cff68000 ioremap
    0xffffc20000c20000-0xffffc20000c22000 8192 acpi_os_map_memory+0x13/0x1c phys=cff68000 ioremap
    0xffffc20000c22000-0xffffc20000c24000 8192 acpi_os_map_memory+0x13/0x1c phys=cff68000 ioremap
    0xffffc20000c24000-0xffffc20000c26000 8192 acpi_os_map_memory+0x13/0x1c phys=e0081000 ioremap
    0xffffc20000c26000-0xffffc20000c28000 8192 acpi_os_map_memory+0x13/0x1c phys=e0080000 ioremap
    0xffffc20000c28000-0xffffc20000c2d000 20480 alloc_large_system_hash+0x127/0x246 pages=4 vmalloc
    0xffffc20000c2d000-0xffffc20000c31000 16384 tcp_init+0xd5/0x31c pages=3 vmalloc
    0xffffc20000c31000-0xffffc20000c34000 12288 alloc_large_system_hash+0x127/0x246 pages=2 vmalloc
    0xffffc20000c34000-0xffffc20000c36000 8192 init_vdso_vars+0xde/0x1f1
    0xffffc20000c36000-0xffffc20000c38000 8192 pci_iomap+0x8a/0xb4 phys=d8e00000 ioremap
    0xffffc20000c38000-0xffffc20000c3a000 8192 usb_hcd_pci_probe+0x139/0x295 [usbcore] phys=d8e00000 ioremap
    0xffffc20000c3a000-0xffffc20000c3e000 16384 sys_swapon+0x509/0xa15 pages=3 vmalloc
    0xffffc20000c40000-0xffffc20000c61000 135168 e1000_probe+0x1c4/0xa32 phys=d8a20000 ioremap
    0xffffc20000c61000-0xffffc20000c6a000 36864 _xfs_buf_map_pages+0x8e/0xc0 vmap
    0xffffc20000c6a000-0xffffc20000c73000 36864 _xfs_buf_map_pages+0x8e/0xc0 vmap
    0xffffc20000c73000-0xffffc20000c7c000 36864 _xfs_buf_map_pages+0x8e/0xc0 vmap
    0xffffc20000c7c000-0xffffc20000c7f000 12288 e1000e_setup_tx_resources+0x29/0xbe pages=2 vmalloc
    0xffffc20000c80000-0xffffc20001481000 8392704 pci_mmcfg_arch_init+0x90/0x118 phys=e0000000 ioremap
    0xffffc20001481000-0xffffc20001682000 2101248 alloc_large_system_hash+0x127/0x246 pages=512 vmalloc
    0xffffc20001682000-0xffffc20001e83000 8392704 alloc_large_system_hash+0x127/0x246 pages=2048 vmalloc vpages
    0xffffc20001e83000-0xffffc20002204000 3674112 alloc_large_system_hash+0x127/0x246 pages=896 vmalloc vpages
    0xffffc20002204000-0xffffc2000220d000 36864 _xfs_buf_map_pages+0x8e/0xc0 vmap
    0xffffc2000220d000-0xffffc20002216000 36864 _xfs_buf_map_pages+0x8e/0xc0 vmap
    0xffffc20002216000-0xffffc2000221f000 36864 _xfs_buf_map_pages+0x8e/0xc0 vmap
    0xffffc2000221f000-0xffffc20002228000 36864 _xfs_buf_map_pages+0x8e/0xc0 vmap
    0xffffc20002228000-0xffffc20002231000 36864 _xfs_buf_map_pages+0x8e/0xc0 vmap
    0xffffc20002231000-0xffffc20002234000 12288 e1000e_setup_rx_resources+0x35/0x122 pages=2 vmalloc
    0xffffc20002240000-0xffffc20002261000 135168 e1000_probe+0x1c4/0xa32 phys=d8a60000 ioremap
    0xffffc20002261000-0xffffc2000270c000 4894720 sys_swapon+0x509/0xa15 pages=1194 vmalloc vpages
    0xffffffffa0000000-0xffffffffa0022000 139264 module_alloc+0x4f/0x55 pages=33 vmalloc
    0xffffffffa0022000-0xffffffffa0029000 28672 module_alloc+0x4f/0x55 pages=6 vmalloc
    0xffffffffa002b000-0xffffffffa0034000 36864 module_alloc+0x4f/0x55 pages=8 vmalloc
    0xffffffffa0034000-0xffffffffa003d000 36864 module_alloc+0x4f/0x55 pages=8 vmalloc
    0xffffffffa003d000-0xffffffffa0049000 49152 module_alloc+0x4f/0x55 pages=11 vmalloc
    0xffffffffa0049000-0xffffffffa0050000 28672 module_alloc+0x4f/0x55 pages=6 vmalloc

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Christoph Lameter
    Reviewed-by: KOSAKI Motohiro
    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Not all architectures define cache_line_size() so as suggested by Andrew move
    the private implementations in mm/slab.c and mm/slob.c to .

    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Reviewed-by: Christoph Lameter
    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • Filtering zonelists requires very frequent use of zone_idx(). This is costly
    as it involves a lookup of another structure and a substraction operation. As
    the zone_idx is often required, it should be quickly accessible. The node idx
    could also be stored here if it was found that accessing zone->node is
    significant which may be the case on workloads where nodemasks are heavily
    used.

    This patch introduces a struct zoneref to store a zone pointer and a zone
    index. The zonelist then consists of an array of these struct zonerefs which
    are looked up as necessary. Helpers are given for accessing the zone index as
    well as the node index.

    [kamezawa.hiroyu@jp.fujitsu.com: Suggested struct zoneref instead of embedding information in pointers]
    [hugh@veritas.com: mm-have-zonelist: fix memcg ooms]
    [hugh@veritas.com: just return do_try_to_free_pages]
    [hugh@veritas.com: do_try_to_free_pages gfp_mask redundant]
    Signed-off-by: Mel Gorman
    Acked-by: Christoph Lameter
    Acked-by: David Rientjes
    Signed-off-by: Lee Schermerhorn
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: Christoph Lameter
    Cc: Nick Piggin
    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • Currently a node has two sets of zonelists, one for each zone type in the
    system and a second set for GFP_THISNODE allocations. Based on the zones
    allowed by a gfp mask, one of these zonelists is selected. All of these
    zonelists consume memory and occupy cache lines.

    This patch replaces the multiple zonelists per-node with two zonelists. The
    first contains all populated zones in the system, ordered by distance, for
    fallback allocations when the target/preferred node has no free pages. The
    second contains all populated zones in the node suitable for GFP_THISNODE
    allocations.

    An iterator macro is introduced called for_each_zone_zonelist() that interates
    through each zone allowed by the GFP flags in the selected zonelist.

    Signed-off-by: Mel Gorman
    Acked-by: Christoph Lameter
    Signed-off-by: Lee Schermerhorn
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: Christoph Lameter
    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • All architectures use an effectively identical definition of online_page(), so
    just make it common code. x86-64, ia64, powerpc and sh are actually
    identical; x86-32 is slightly different.

    x86-32's differences arise because it puts its hotplug pages in the highmem
    zone. We can handle this in the generic code by inspecting the page to see if
    its in highmem, and update the totalhigh_pages count appropriately. This
    leaves init_32.c:free_new_highpage with a single caller, so I folded it into
    add_one_highpage_init.

    I also removed an incorrect comment referring to the NUMA case; any NUMA
    details have already been dealt with by the time online_page() is called.

    [akpm@linux-foundation.org: fix indenting]
    Signed-off-by: Jeremy Fitzhardinge
    Acked-by: Dave Hansen
    Reviewed-by: KAMEZAWA Hiroyuki
    Tested-by: KAMEZAWA Hiroyuki
    Cc: Yasunori Goto
    Cc: Christoph Lameter
    Acked-by: Ingo Molnar
    Acked-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • Adrian Bunk noticed the following Coverity report:

    > Commit e7f260a276f2c9184fe753732d834b1f6fbe9f17
    > (x86: PAT use reserve free memtype in mmap of /dev/mem)
    > added the following gem to arch/x86/mm/pat.c:
    >
    >
    >
    > ...
    > int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
    > unsigned long size, pgprot_t *vma_prot)
    > {
    > u64 offset = ((u64) pfn) << PAGE_SHIFT;
    > unsigned long flags = _PAGE_CACHE_UC_MINUS;
    > unsigned long ret_flags;
    > ...
    > ... (nothing that touches ret_flags)
    > ...
    > if (flags != _PAGE_CACHE_UC_MINUS) {
    > retval = reserve_memtype(offset, offset + size, flags, NULL);
    > } else {
    > retval = reserve_memtype(offset, offset + size, -1, &ret_flags);
    > }
    >
    > if (retval < 0)
    > return 0;
    >
    > flags = ret_flags;
    >
    > if (pfn ioremap_change_attr((unsigned long)__va(offset), size, flags) < 0) {
    > free_memtype(offset, offset + size);
    > printk(KERN_INFO
    > "%s:%d /dev/mem ioremap_change_attr failed %s for %Lx-%Lx\n",
    > current->comm, current->pid,
    > cattr_name(flags),
    > offset, offset + size);
    > return 0;
    > }
    >
    > *vma_prot = __pgprot((pgprot_val(*vma_prot) & ~_PAGE_CACHE_MASK) |
    > flags);
    > return 1;
    > }
    >
    >
    >
    > If (flags != _PAGE_CACHE_UC_MINUS) we pass garbage from the stack to
    > ioremap_change_attr() and/or __pgprot().
    >
    > Spotted by the Coverity checker.

    the fix simplifies the code as we get rid of the 'ret_flags'
    complication.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Ingo already fixed one of these at my request (in "x86 PAT: tone down
    debugging messages", commit 1ebcc654f010d4a63f3ebf8ddd2cab5a709b1824),
    but there was another one he missed.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (147 commits)
    KVM: kill file->f_count abuse in kvm
    KVM: MMU: kvm_pv_mmu_op should not take mmap_sem
    KVM: SVM: remove selective CR0 comment
    KVM: SVM: remove now obsolete FIXME comment
    KVM: SVM: disable CR8 intercept when tpr is not masking interrupts
    KVM: SVM: sync V_TPR with LAPIC.TPR if CR8 write intercept is disabled
    KVM: export kvm_lapic_set_tpr() to modules
    KVM: SVM: sync TPR value to V_TPR field in the VMCB
    KVM: ppc: PowerPC 440 KVM implementation
    KVM: Add MAINTAINERS entry for PowerPC KVM
    KVM: ppc: Add DCR access information to struct kvm_run
    ppc: Export tlb_44x_hwater for KVM
    KVM: Rename debugfs_dir to kvm_debugfs_dir
    KVM: x86 emulator: fix lea to really get the effective address
    KVM: x86 emulator: fix smsw and lmsw with a memory operand
    KVM: x86 emulator: initialize src.val and dst.val for register operands
    KVM: SVM: force a new asid when initializing the vmcb
    KVM: fix kvm_vcpu_kick vs __vcpu_run race
    KVM: add ioctls to save/store mpstate
    KVM: Rename VCPU_MP_STATE_* to KVM_MP_STATE_*
    ...

    Linus Torvalds
     

27 Apr, 2008

7 commits