13 Aug, 2011

2 commits

  • This code can be removed now that MSM targets no longer need the 16-bit
    offsets for P2V.

    Signed-off-by: Nicolas Pitre
    Signed-off-by: Stephen Boyd
    Signed-off-by: Russell King

    Nicolas Pitre
     
  • MSMs post 8x50 have 2Mb at the beginning of RAM reserved for
    shared memory. Since the kernel hasn't typically been told this
    RAM exists, PHYS_OFFSET has been set to 0xN0200000 and the memory
    atags passed to the kernel have matched. This doesn't play nicely
    with things such as AUTO_ZRELADDR, which doesn't work at all, and
    dynamic phys to virt, which requires an MSM specific workaround.

    Work around these issues by telling the kernel RAM starts at
    0xN0000000 (it actually does) and fixup the atags from the
    bootloader (if necessary) to say the same. In addition, make sure
    to set TEXT_OFFSET at least 2Mb beyond the start of RAM so that
    the kernel doesn't end up being decompressed into shared memory.

    After doing this, AUTO_ZRELADDR should work on MSM with no
    problems and ARM_PATCH_PHYS_VIRT_16BIT should no longer be
    necessary.

    Signed-off-by: Stephen Boyd
    Acked-by: Nicolas Pitre
    Acked-by: David Brown
    Signed-off-by: Russell King

    Stephen Boyd
     

11 Aug, 2011

1 commit

  • Enable virtual to physical translation patching by default in all
    kernels. Hide the option behind EMBEDDED.

    This can still be turned off if people desire, and they know what
    they're doing, to shrink the size of the kernel to a minimum.

    Acked-by: Will Deacon
    Signed-off-by: Russell King

    Russell King
     

10 Aug, 2011

1 commit


09 Aug, 2011

5 commits

  • With the UM_SIGNAL alignment fault mode, no siginfo structure is
    passed to userspace.

    POSIX specifies how siginfo_t should be populated for alignment
    faults, so this patch does just that:

    * si_signo = SIGBUS
    * si_code = BUS_ADRALN
    * si_addr = misaligned data address at which access was attempted

    Signed-off-by: Dave Martin
    Acked-by: Nicolas Pitre
    Acked-by: Kirill A. Shutemov
    Reviewed-by: Will Deacon
    Signed-off-by: Russell King

    Dave Martin
     
  • Currently, it's possible to set the kernel to ignore alignment
    faults when changing the alignment fault handling mode at runtime
    via /proc/sys/alignment, even though this is undesirable on ARMv6
    and above, where it can result in infinite spins where an un-fixed-
    up instruction repeatedly faults.

    In addition, the kernel clobbers any alignment mode specified on
    the command-line if running on ARMv6 or above.

    This patch factors out the necessary safety check into a couple of
    new helper functions, and checks and modifies the fault handling
    mode as appropriate on boot and on writes to /proc/cpu/alignment.

    Prior to ARMv6, the behaviour is unchanged.

    For ARMv6 and above, the behaviour changes as follows:

    * Attempting to ignore faults on ARMv6 results in the mode being
    forced to UM_FIXUP instead. A warning is printed if this
    happened as a result of a write to /proc/cpu/alignment. The
    user's UM_WARN bit (if present) is still honoured.

    * An alignment= argument from the kernel command-line is now
    honoured, except that the kernel will modify the specified mode
    as described above. This is allows modes such as UM_SIGNAL and
    UM_WARN to be active immediately from boot, which is useful for
    debugging purposes.

    Signed-off-by: Dave Martin
    Acked-by: Nicolas Pitre
    Signed-off-by: Russell King

    Dave Martin
     
  • poison_init_mem() used a loop of:

    while ((count = count - 4))

    which has 2 problems - an off by one error so that we do one less word
    than we should, and the other is that if count == 0 then we loop forever
    and poison too much. On a platform with HAVE_TCM=y but nothing in the
    TCM's, this caused corruption and the platform failed to boot.

    Acked-by: Stephen Boyd
    Acked-by: Nicolas Pitre
    Signed-off-by: Jamie Iles
    Signed-off-by: Russell King

    Jamie Iles
     
  • The file mm/proc-arm946.S contains a typo and is missing a structure
    member in __arm946_proc_info. The former prevents compilation
    and the latter causes problems during boot. It is likely this
    file was manually copied from a similar file and not tested, then
    later updates to the *_proc_info structures missed this file.

    This patch will apply (with offset) with or without the
    recent macro unification work that has been done in this directory.
    This was verified against linux-next/stable last week.

    See arm-linux-kernel thread:
    http://lists.arm.linux.org.uk/lurker/message/20110718.103237.0106d468.en.html

    Signed-off-by: Brian S. Julin
    Signed-off-by: Russell King

    Brian S. Julin
     
  • Something changed during the 3.1 merge window in the include files
    which now causes the pl08x DMA engine driver to fail to build. Fix
    this by adding the now necessary dma-mapping.h include:

    drivers/dma/amba-pl08x.c: In function ■pl08x_unmap_buffers■:
    drivers/dma/amba-pl08x.c:1524: error: implicit declaration of function ■dma_unmap_single■
    drivers/dma/amba-pl08x.c:1527: error: implicit declaration of function ■dma_unmap_page■

    Acked-by: Vinod Koul
    Acked-by: Linus Walleij
    Signed-off-by: Russell King

    Russell King
     

04 Aug, 2011

31 commits

  • Unfortunately, the module fixups cause the kernel to fail to build
    when SMP is not enabled. Fix this by removing the reference to
    fixup_smp on non-SMP fixup kernels, but ensuring that if we do have
    the SMP fixup section, we refuse to load the module.

    Signed-off-by: Russell King

    Russell King
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data
    target: Fix bug for transport_generic_wait_for_tasks with direct operation
    target: iscsi_target depends on NET
    target: Fix WRITE_SAME_16 lba assignment breakage
    MAINTAINERS: Add target-devel list for drivers/target/
    iscsi-target: Fix CONFIG_SMP=n and CONFIG_MODULES=n build failure
    iscsi-target: Fix snprintf usage with MAX_PORTAL_LEN
    iscsi-target: Fix uninitialized usage of cmd->pad_bytes
    iscsi-target: strlen() doesn't count the terminator
    iscsi-target: Fix NULL dereference on allocation failure

    Linus Torvalds
     
  • * 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6:
    dt: add of_alias_scan and of_alias_get_id

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    ext4: use kzalloc in ext4_kzalloc()

    Linus Torvalds
     
  • We may optimistically check .in_use == 0 without holding the rw_mutex:
    it's the common case, and if it's zero, there certainly won't be any
    segments associated with us.

    After taking the lock, the idr_for_each() will do the right thing, so we
    could now drop the re-check inside the lock without any real cost. But
    it won't hurt.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Linus Torvalds

    Vasiliy Kulikov
     
  • Commit 4c677e2eefdb ("shm: optimize locking and ipc_namespace getting")
    introduced a copy-paste bug. Due to the bug cycle optimizations were
    disabled.

    Signed-off-by: Vasiliy Kulikov
    Signed-off-by: Linus Torvalds

    Vasiliy Kulikov
     
  • Expand the fs/Kconfig "help" info to clarify why it's a bad idea to
    deselect the TMPFS_POSIX_ACL config variable.

    Signed-off-by: Robert P. J. Day
    Acked-by: Randy Dunlap
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Make the radix_tree exceptional cases, mostly in filemap.c, clearer.

    It's hard to devise a suitable snappy name that illuminates the use by
    shmem/tmpfs for swap, while keeping filemap/pagecache/radix_tree
    generality. And akpm points out that /* radix_tree_deref_retry(page) */
    comments look like calls that have been commented out for unknown
    reason.

    Skirt the naming difficulty by rearranging these blocks to handle the
    transient radix_tree_deref_retry(page) case first; then just explain the
    remaining shmem/tmpfs swap case in a comment.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • We have already acknowledged that swapoff of a tmpfs file is slower than
    it was before conversion to the generic radix_tree: a little slower
    there will be acceptable, if the hotter paths are faster.

    But it was a shock to find swapoff of a 500MB file 20 times slower on my
    laptop, taking 10 minutes; and at that rate it significantly slows down
    my testing.

    Now, most of that turned out to be overhead from PROVE_LOCKING and
    PROVE_RCU: without those it was only 4 times slower than before; and
    more realistic tests on other machines don't fare as badly.

    I've tried a number of things to improve it, including tagging the swap
    entries, then doing lookup by tag: I'd expected that to halve the time,
    but in practice it's erratic, and often counter-productive.

    The only change I've so far found to make a consistent improvement, is
    to short-circuit the way we go back and forth, gang lookup packing
    entries into the array supplied, then shmem scanning that array for the
    target entry. Scanning in place doubles the speed, so it's now only
    twice as slow as before (or three times slower when the PROVEs are on).

    So, add radix_tree_locate_item() as an expedient, once-off,
    single-caller hack to do the lookup directly in place. #ifdef it on
    CONFIG_SHMEM and CONFIG_SWAP, as much to document its limited
    applicability as save space in other configurations. And, sadly,
    #include sched.h for cond_resched().

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Remove PageSwapBacked (!page_is_file_cache) cases from
    add_to_page_cache_locked() and add_to_page_cache_lru(): those pages now
    go through shmem_add_to_page_cache().

    Remove a comment on maximum tmpfs size from fsstack_copy_inode_size(),
    and add a comment on swap entries to invalidate_mapping_pages().

    And mincore_page() uses find_get_page() on what might be shmem or a
    tmpfs file: allow for a radix_tree_exceptional_entry(), and proceed to
    find_get_page() on swapper_space if so (oh, swapper_space needs #ifdef).

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • But we've not yet removed the old swp_entry_t i_direct[16] from
    shmem_inode_info. That's because it was still being shared with the
    inline symlink. Remove it now (saving 64 or 128 bytes from shmem inode
    size), and use kmemdup() for short symlinks, say, those up to 128 bytes.

    I wonder why mpol_free_shared_policy() is done in shmem_destroy_inode()
    rather than shmem_evict_inode(), where we usually do such freeing? I
    guess it doesn't matter, and I'm not into NUMA mpol testing right now.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Reviewed-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Convert shmem_writepage() to use shmem_delete_from_page_cache() to use
    shmem_radix_tree_replace() to substitute swap entry for page pointer
    atomically in the radix tree.

    As with shmem_add_to_page_cache(), it's not entirely satisfactory to be
    copying such code from delete_from_swap_cache, but again judged easier
    to sell than making its other callers go through the extras.

    Remove the toy implementation's shmem_put_swap() and shmem_get_swap(),
    now unreferenced, and the hack to disable swap: it's now good to go.

    The way things have worked out, info->lock no longer helps to guard the
    shmem_swaplist: we increment swapped under shmem_swaplist_mutex only.
    That global mutex exclusion between shmem_writepage() and shmem_unuse()
    is not pretty, and we ought to find another way; but it's been forced on
    us by recent race discoveries, not a consequence of this patchset.

    And what has become of the WARN_ON_ONCE(1) free_swap_and_cache() if a
    swap entry was found already present? That's no longer possible, the
    (unknown) one inserting this page into filecache would hit the swap
    entry occupying that slot.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Remove mem_cgroup_shmem_charge_fallback(): it was only required when we
    had to move swappage to filecache with GFP_NOWAIT.

    Remove the GFP_NOWAIT special case from mem_cgroup_cache_charge(), by
    moving its call out from shmem_add_to_page_cache() to two of thats three
    callers. But leave it doing mem_cgroup_uncharge_cache_page() on error:
    although asymmetrical, it's easier for all 3 callers to handle.

    These two changes would also be appropriate if anyone were to start
    using shmem_read_mapping_page_gfp() with GFP_NOWAIT.

    Remove mem_cgroup_get_shmem_target(): mc_handle_file_pte() can test
    radix_tree_exceptional_entry() to get what it needs for itself.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Convert shmem_getpage_gfp(), the engine-room of shmem, to expect page or
    swap entry returned from radix tree by find_lock_page().

    Whereas the repetitive old method proceeded mainly under info->lock,
    dropping and repeating whenever one of the conditions needed was not
    met, now we can proceed without it, leaving shmem_add_to_page_cache() to
    check for a race.

    This way there is no need to preallocate a page, no need for an early
    radix_tree_preload(), no need for mem_cgroup_shmem_charge_fallback().

    Move the error unwinding down to the bottom instead of repeating it
    throughout. ENOSPC handling is a little different from before: there is
    no longer any race between find_lock_page() and finding swap, but we can
    arrive at ENOSPC before calling shmem_recalc_inode(), which might
    occasionally discover freed space.

    Be stricter to check i_size before returning. info->lock is used for
    little but alloced, swapped, i_blocks updates. Move i_blocks updates
    out from under the max_blocks check, so even an unlimited size=0 mount
    can show accurate du.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Convert shmem_unuse_inode() to use a lockless gang lookup of the radix
    tree, searching for matching swap.

    This is somewhat slower than the old method: because of repeated radix
    tree descents, because of copying entries up, but probably most because
    the old method noted and skipped once a vector page was cleared of swap.
    Perhaps we can devise a use of radix tree tagging to achieve that later.

    shmem_add_to_page_cache() uses shmem_radix_tree_replace() to compensate
    for the lockless lookup by checking that the expected entry is in place,
    under lock. It is not very satisfactory to be copying this much from
    add_to_page_cache_locked(), but I think easier to sell than insisting
    that every caller of add_to_page_cache*() go through the extras.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Disable the toy swapping implementation in shmem_writepage() - it's hard
    to support two schemes at once - and convert shmem_truncate_range() to a
    lockless gang lookup of swap entries along with pages, freeing both.

    Since the second loop tightens its noose until all entries of either
    kind have been squeezed out (and we shall make sure that there's not an
    instant when neither is visible), there is no longer a need for yet
    another pass below.

    shmem_radix_tree_replace() compensates for the lockless lookup by
    checking that the expected entry is in place, under lock, before
    replacing it. Here it just deletes, but will be used in later patches
    to substitute swap entry for page or page for swap entry.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Bring truncate.c's code for truncate_inode_pages_range() inline into
    shmem_truncate_range(), replacing its first call (there's a followup
    call below, but leave that one, it will disappear next).

    Don't play with it yet, apart from leaving out the cleancache flush, and
    (importantly) the nrpages == 0 skip, and moving shmem_setattr()'s
    partial page preparation into its partial page handling.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • While it's at its least, make a number of boring nitpicky cleanups to
    shmem.c, mostly for consistency of variable naming. Things like "swap"
    instead of "entry", "pgoff_t index" instead of "unsigned long idx".

    And since everything else here is prefixed "shmem_", better change
    init_tmpfs() to shmem_init().

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • The maximum size of a shmem/tmpfs file has been limited by the maximum
    size of its triple-indirect swap vector. With 4kB page size, maximum
    filesize was just over 2TB on a 32-bit kernel, but sadly one eighth of
    that on a 64-bit kernel. (With 8kB page size, maximum filesize was just
    over 4TB on a 64-bit kernel, but 16TB on a 32-bit kernel,
    MAX_LFS_FILESIZE being then more restrictive than swap vector layout.)

    It's a shame that tmpfs should be more restrictive than ramfs, and this
    limitation has now been noticed. Add another level to the swap vector?
    No, it became obscure and hard to maintain, once I complicated it to
    make use of highmem pages nine years ago: better choose another way.

    Surely, if 2.4 had had the radix tree pagecache introduced in 2.5, then
    tmpfs would never have invented its own peculiar radix tree: we would
    have fitted swap entries into the common radix tree instead, in much the
    same way as we fit swap entries into page tables.

    And why should each file have a separate radix tree for its pages and
    for its swap entries? The swap entries are required precisely where and
    when the pages are not. We want to put them together in a single radix
    tree: which can then avoid much of the locking which was needed to
    prevent them from being exchanged underneath us.

    This also avoids the waste of memory devoted to swap vectors, first in
    the shmem_inode itself, then at least two more pages once a file grew
    beyond 16 data pages (pages accounted by df and du, but not by memcg).
    Allocated upfront, to avoid allocation when under swapping pressure, but
    pure waste when CONFIG_SWAP is not set - I have never spattered around
    the ifdefs to prevent that, preferring this move to sharing the common
    radix tree instead.

    There are three downsides to sharing the radix tree. One, that it binds
    tmpfs more tightly to the rest of mm, either requiring knowledge of swap
    entries in radix tree there, or duplication of its code here in shmem.c.
    I believe that the simplications and memory savings (and probable higher
    performance, not yet measured) justify that.

    Two, that on HIGHMEM systems with SWAP enabled, it's the lowmem radix
    nodes that cannot be freed under memory pressure - whereas before it was
    the less precious highmem swap vector pages that could not be freed.
    I'm hoping that 64-bit has now been accessible for long enough, that the
    highmem argument has grown much less persuasive.

    Three, that swapoff is slower than it used to be on tmpfs files, since
    it's using a simple generic mechanism not tailored to it: I find this
    noticeable, and shall want to improve, but maybe nobody else will
    notice.

    So... now remove most of the old swap vector code from shmem.c. But,
    for the moment, keep the simple i_direct vector of 16 pages, with simple
    accessors shmem_put_swap() and shmem_get_swap(), as a toy implementation
    to help mark where swap needs to be handled in subsequent patches.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • If swap entries are to be stored along with struct page pointers in a
    radix tree, they need to be distinguished as exceptional entries.

    Most of the handling of swap entries in radix tree will be contained in
    shmem.c, but a few functions in filemap.c's common code need to check
    for their appearance: find_get_page(), find_lock_page(),
    find_get_pages() and find_get_pages_contig().

    So as not to slow their fast paths, tuck those checks inside the
    existing checks for unlikely radix_tree_deref_slot(); except for
    find_lock_page(), where it is an added test. And make it a BUG in
    find_get_pages_tag(), which is not applied to tmpfs files.

    A part of the reason for eliminating shmem_readpage() earlier, was to
    minimize the places where common code would need to allow for swap
    entries.

    The swp_entry_t known to swapfile.c must be massaged into a slightly
    different form when stored in the radix tree, just as it gets massaged
    into a pte_t when stored in page tables.

    In an i386 kernel this limits its information (type and page offset) to
    30 bits: given 32 "types" of swapfile and 4kB pagesize, that's a maximum
    swapfile size of 128GB. Which is less than the 512GB we previously
    allowed with X86_PAE (where the swap entry can occupy the entire upper
    32 bits of a pte_t), but not a new limitation on 32-bit without PAE; and
    there's not a new limitation on 64-bit (where swap filesize is already
    limited to 16TB by a 32-bit page offset). Thirty areas of 128GB is
    probably still enough swap for a 64GB 32-bit machine.

    Provide swp_to_radix_entry() and radix_to_swp_entry() conversions, and
    enforce filesize limit in read_swap_header(), just as for ptes.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • A patchset to extend tmpfs to MAX_LFS_FILESIZE by abandoning its
    peculiar swap vector, instead keeping a file's swap entries in the same
    radix tree as its struct page pointers: thus saving memory, and
    simplifying its code and locking.

    This patch:

    The radix_tree is used by several subsystems for different purposes. A
    major use is to store the struct page pointers of a file's pagecache for
    memory management. But what if mm wanted to store something other than
    page pointers there too?

    The low bit of a radix_tree entry is already used to denote an indirect
    pointer, for internal use, and the unlikely radix_tree_deref_retry()
    case.

    Define the next bit as denoting an exceptional entry, and supply inline
    functions radix_tree_exception() to return non-0 in either unlikely
    case, and radix_tree_exceptional_entry() to return non-0 in the second
    case.

    If a subsystem already uses radix_tree with that bit set, no problem: it
    does not affect internal workings at all, but is defined for the
    convenience of those storing well-aligned pointers in the radix_tree.

    The radix_tree_gang_lookups have an implicit assumption that the caller
    can deduce the offset of each entry returned e.g. by the page->index of
    a struct page. But that may not be feasible for some kinds of item to
    be stored there.

    radix_tree_gang_lookup_slot() allow for an optional indices argument,
    output array in which to return those offsets. The same could be added
    to other radix_tree_gang_lookups, but for now keep it to the only one
    for which we need it.

    Signed-off-by: Hugh Dickins
    Acked-by: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • i386 allmodconfig:

    drivers/built-in.o: In function `aat2870_bl_remove':
    aat2870_bl.c:(.text+0x414f9): undefined reference to `backlight_device_unregister'
    drivers/built-in.o: In function `aat2870_bl_probe':
    aat2870_bl.c:(.text+0x418fc): undefined reference to `backlight_device_register'
    aat2870_bl.c:(.text+0x41a31): undefined reference to `backlight_device_unregiste

    Cc: Jin Park
    Cc: Samuel Ortiz
    Cc: Axel Lin
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • - Current implementation tests wrong value for setting
    aat2870_bl->max_current.

    - In the current implementation, we cannot differentiate between 2 cases:

    a) if pdata->max_current is not set , or

    b) pdata->max_current is set to AAT2870_CURRENT_0_45 (which is also 0).

    Fix it by setting AAT2870_CURRENT_0_45 to be 1 and adjust the equation in
    aat2870_brightness() accordingly.

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Cc: Samuel Ortiz
    Tested-by: Jin Park
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • backlight_device_register() returns ERR_PTR() on error.

    Signed-off-by: Axel Lin
    Cc: Richard Purdie
    Cc: Jin Park
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Fix:

    arch/cris/arch-v10/kernel/irq.c:239: error: implicit declaration of function 'kgdb_init'
    arch/cris/arch-v10/kernel/irq.c:240: error: implicit declaration of function 'breakpoint'

    Declare these two functions.

    Reported-by: Geert Uytterhoeven
    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Fix:

    arch/cris/arch-v10/drivers/sync_serial.c:961: error: conflicting types for 'sync_serial_ioctl'

    Reported-by: Geert Uytterhoeven
    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Fix:

    arch/cris/arch-v10/drivers/sync_serial.c:628: error: 'ret' undeclared (first use in this function)

    'ret' should be 'err'.

    Reported-by: Geert Uytterhoeven
    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Fix this error:

    kernel/fork.c:267: error: implicit declaration of function 'alloc_thread_info_node'

    This is due to renaming alloc_thread_info() to alloc_thread_info_node().

    [akpm@linux-foundation.org: coding-style fixes]
    Reported-by: Geert Uytterhoeven
    Signed-off-by: WANG Cong
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     
  • Fix tpm_tis.c build when CONFIG_ACPI is not enabled by providing a stub
    function. Fixes many build errors/warnings:

    drivers/char/tpm/tpm_tis.c:89: error: dereferencing pointer to incomplete type
    drivers/char/tpm/tpm_tis.c:89: warning: type defaults to 'int' in declaration of 'type name'
    drivers/char/tpm/tpm_tis.c:89: error: request for member 'list' in something not a structure or union
    ...

    Signed-off-by: Randy Dunlap
    Cc: Leendert van Doorn
    Cc: James Morris
    Cc: Ingo Molnar
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • __GFP_OTHER_NODE is used for NUMA allocations on behalf of other nodes.
    It's supposed to be passed through from the page allocator to
    zone_statistics(), but it never gets there as gfp_allowed_mask is not
    wide enough and masks out the flag early in the allocation path.

    The result is an accounting glitch where successful NUMA allocations
    by-agent are not properly attributed as local.

    Increase __GFP_BITS_SHIFT so that it includes __GFP_OTHER_NODE.

    Signed-off-by: Johannes Weiner
    Acked-by: Andi Kleen
    Reviewed-by: Minchan Kim
    Acked-by: Mel Gorman
    Reviewed-by: Michal Hocko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Update the module parameters when platform data is used. This means
    that they can be read from /sys/module/ramoops/parameters in order to
    parse the memory area.

    Signed-off-by: Sergiu Iordache
    Cc: Marco Stornelli
    Cc: Seiji Aguchi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergiu Iordache