]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agosparc64: kill page table quicklists
David S. Miller [Tue, 26 Jul 2011 00:12:20 +0000 (17:12 -0700)]
sparc64: kill page table quicklists

With the recent mmu_gather changes that included generic RCU freeing of
page-tables, it is now quite straightforward to implement gup_fast() on
sparc64.

This patch:

Remove the page table quicklists.  They are pointless and make it harder
to use RCU page table freeing and share code with other architectures.

BTW, this is the second time this has happened, see commit 3c936465249f
("[SPARC64]: Kill pgtable quicklists and use SLAB.")

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agommap: fix and tidy up overcommit page arithmetic
Dmitry Fink [Tue, 26 Jul 2011 00:12:19 +0000 (17:12 -0700)]
mmap: fix and tidy up overcommit page arithmetic

- shmem pages are not immediately available, but they are not
  potentially available either, even if we swap them out, they will just
  relocate from memory into swap, total amount of immediate and
  potentially available memory is not going to be affected, so we
  shouldn't count them as potentially free in the first place.

- nr_free_pages() is not an expensive operation anymore, there is no
  need to split the decision making in two halves and repeat code.

Signed-off-by: Dmitry Fink <dmitry.fink@palm.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm/memblock.c: avoid abuse of RED_INACTIVE
Andrew Morton [Tue, 26 Jul 2011 00:12:18 +0000 (17:12 -0700)]
mm/memblock.c: avoid abuse of RED_INACTIVE

RED_INACTIVE is a slab thing, and reusing it for memblock was
inappropriate, because memblock is dealing with phys_addr_t's which have a
Kconfigurable sizeof().

Create a new poison type for this application.  Fixes the sparse warning

    warning: cast truncates bits from constant value (9f911029d74e35b becomes 9d74e35b)

Reported-by: H Hartley Sweeten <hartleys@visionengravers.com>
Tested-by: H Hartley Sweeten <hartleys@visionengravers.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agooom: make deprecated use of oom_adj more verbose
David Rientjes [Tue, 26 Jul 2011 00:12:18 +0000 (17:12 -0700)]
oom: make deprecated use of oom_adj more verbose

/proc/pid/oom_adj is deprecated and scheduled for removal in August 2012
according to Documentation/feature-removal-schedule.txt.

This patch makes the warning more verbose by making it appear as a more
serious problem (the presence of a stack trace and being multiline should
attract more attention) so that applications still using the old interface
can get fixed.

Very popular users of the old interface have been converted since the oom
killer rewrite has been introduced.  udevd switched to the
/proc/pid/oom_score_adj interface for v162, kde switched in 4.6.1, and
opensshd switched in 5.7p1.

At the start of 2012, this should be changed into a WARN() to emit all
such incidents and then finally remove the tunable in August 2012 as
scheduled.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agooom: remove references to old badness() function
David Rientjes [Tue, 26 Jul 2011 00:12:17 +0000 (17:12 -0700)]
oom: remove references to old badness() function

The badness() function in the oom killer was renamed to oom_badness() in
a63d83f427fb ("oom: badness heuristic rewrite") since it is a globally
exported function for clarity.

The prototype for the old function still existed in linux/oom.h, so remove
it.  There are no existing users.

Also fixes documentation and comment references to badness() and adjusts
them accordingly.

Signed-off-by: David Rientjes <rientjes@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm/memory.c: remove ZAP_BLOCK_SIZE
Andrew Morton [Tue, 26 Jul 2011 00:12:16 +0000 (17:12 -0700)]
mm/memory.c: remove ZAP_BLOCK_SIZE

ZAP_BLOCK_SIZE became unused in the preemptible-mmu_gather work ("mm:
Remove i_mmap_lock lockbreak").  So zap it.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: hugetlb: fix coding style issues
Chris Forbes [Tue, 26 Jul 2011 00:12:14 +0000 (17:12 -0700)]
mm: hugetlb: fix coding style issues

Fix coding style issues flagged by checkpatch.pl

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Eric B Munson <emunson@mgebm.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm/huge_memory.c: minor lock simplification in __khugepaged_exit
Chris Wright [Tue, 26 Jul 2011 00:12:14 +0000 (17:12 -0700)]
mm/huge_memory.c: minor lock simplification in __khugepaged_exit

The lock is released first thing in all three branches.  Simplify this by
unconditionally releasing lock and remove else clause which was only there
to be sure lock was released.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm/page_cgroup.c: simplify code by using SECTION_ALIGN_UP() and SECTION_ALIGN_DOWN...
Daniel Kiper [Tue, 26 Jul 2011 00:12:13 +0000 (17:12 -0700)]
mm/page_cgroup.c: simplify code by using SECTION_ALIGN_UP() and SECTION_ALIGN_DOWN() macros

Commit a539f3533b78e3 ("mm: add SECTION_ALIGN_UP() and
SECTION_ALIGN_DOWN() macro") introduced the SECTION_ALIGN_UP() and
SECTION_ALIGN_DOWN() macros.  Use those macros to increase code
readability.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: remove the leftovers of noswapaccount
WANG Cong [Tue, 26 Jul 2011 00:12:12 +0000 (17:12 -0700)]
mm: remove the leftovers of noswapaccount

In commit a2c8990aed5ab ("memsw: remove noswapaccount kernel parameter"),
Michal forgot to remove some left pieces of noswapaccount in the tree,
this patch removes them all.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agopagewalk: fix code comment for THP
KOSAKI Motohiro [Tue, 26 Jul 2011 00:12:11 +0000 (17:12 -0700)]
pagewalk: fix code comment for THP

Commit bae9c19bf1 ("thp: split_huge_page_mm/vma") changed locking behavior
of walk_page_range().  Thus this patch changes the comment too.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hiroyuki Kamezawa <kamezawa.hiroyuki@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agopagewalk: add locking-rule comments
KOSAKI Motohiro [Tue, 26 Jul 2011 00:12:10 +0000 (17:12 -0700)]
pagewalk: add locking-rule comments

Originally, walk_hugetlb_range() didn't require a caller take any lock.
But commit d33b9f45bd ("mm: hugetlb: fix hugepage memory leak in
walk_page_range") changed its rule.  Because it added find_vma() call in
walk_hugetlb_range().

Any locking-rule change commit should write a doc too.

[akpm@linux-foundation.org: clarify comment]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hiroyuki Kamezawa <kamezawa.hiroyuki@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agopagewalk: don't look up vma if walk->hugetlb_entry is unused
KOSAKI Motohiro [Tue, 26 Jul 2011 00:12:09 +0000 (17:12 -0700)]
pagewalk: don't look up vma if walk->hugetlb_entry is unused

Currently, walk_page_range() calls find_vma() every page table for walk
iteration.  but it's completely unnecessary if walk->hugetlb_entry is
unused.  And we don't have to assume find_vma() is a lightweight
operation.  So this patch checks the walk->hugetlb_entry and avoids the
find_vma() call if possible.

This patch also makes some cleanups.  1) remove ugly uninitialized_var()
and 2) #ifdef in function body.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hiroyuki Kamezawa <kamezawa.hiroyuki@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agopagewalk: fix walk_page_range() don't check find_vma() result properly
KOSAKI Motohiro [Tue, 26 Jul 2011 00:12:09 +0000 (17:12 -0700)]
pagewalk: fix walk_page_range() don't check find_vma() result properly

The doc of find_vma() says,

    /* Look up the first VMA which satisfies  addr < vm_end,  NULL if none. */
    struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
    {
     (snip)

Thus, caller should confirm whether the returned vma matches a desired one.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Hiroyuki Kamezawa <kamezawa.hiroyuki@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: swap-token: add a comment for priority aging
KOSAKI Motohiro [Tue, 26 Jul 2011 00:12:08 +0000 (17:12 -0700)]
mm: swap-token: add a comment for priority aging

Document some swap token aging design decisions.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: swap-token: makes global variables to function local
KOSAKI Motohiro [Tue, 26 Jul 2011 00:12:07 +0000 (17:12 -0700)]
mm: swap-token: makes global variables to function local

global_faults and last_aging are only used in grab_swap_token().  Move
them into grab_swap_token().

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: swap-token: fix dead link
KOSAKI Motohiro [Tue, 26 Jul 2011 00:12:06 +0000 (17:12 -0700)]
mm: swap-token: fix dead link

http://www.cs.wm.edu/~sjiang/token.pdf is now dead.  Replace it with an
alive alternative.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoxen/balloon: memory hotplug support for Xen balloon driver
Daniel Kiper [Tue, 26 Jul 2011 00:12:06 +0000 (17:12 -0700)]
xen/balloon: memory hotplug support for Xen balloon driver

Memory hotplug support for Xen balloon driver.  It should be mentioned
that hotplugged memory is not onlined automatically.  It should be onlined
by user through standard sysfs interface.

Memory could be hotplugged in following steps:

  1) dom0: xl mem-max <domU> <maxmem>
     where <maxmem> is >= requested memory size,

  2) dom0: xl mem-set <domU> <memory>
     where <memory> is requested memory size; alternatively memory
     could be added by writing proper value to
     /sys/devices/system/xen_memory/xen_memory0/target or
     /sys/devices/system/xen_memory/xen_memory0/target_kb on dumU,

  3) domU: for i in /sys/devices/system/memory/memory*/state; do \
             [ "`cat "$i"`" = offline ] && echo online > "$i"; done

Memory could be onlined automatically on domU by adding following line to
udev rules:

  SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'"

In that case step 3 should be omitted.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: extend memory hotplug API to allow memory hotplug in virtual machines
Daniel Kiper [Tue, 26 Jul 2011 00:12:05 +0000 (17:12 -0700)]
mm: extend memory hotplug API to allow memory hotplug in virtual machines

This patch contains online_page_callback and apropriate functions for
registering/unregistering online page callbacks.  It allows to do some
machine specific tasks during online page stage which is required to
implement memory hotplug in virtual machines.  Currently this patch is
required by latest memory hotplug support for Xen balloon driver patch
which will be posted soon.

Additionally, originial online_page() function was splited into
following functions doing "atomic" operations:

  - __online_page_set_limits() - set new limits for memory management code,
  - __online_page_increment_counters() - increment totalram_pages and totalhigh_pages,
  - __online_page_free() - free page to allocator.

It was done to:
  - not duplicate existing code,
  - ease hotplug code devolpment by usage of well defined interface,
  - avoid stupid bugs which are unavoidable when the same code
    (by design) is developed in many places.

[akpm@linux-foundation.org: use explicit indirect-call syntax]
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agobacklight: set backlight type and max_brightness before backlights are registered
Axel Lin [Tue, 26 Jul 2011 00:12:01 +0000 (17:12 -0700)]
backlight: set backlight type and max_brightness before backlights are registered

Since commit a19a6ee "backlight: Allow properties to be passed at
registration" and commit bb7ca74 "backlight: add backlight type", we can
set backlight type and max_brightness before backlights are registered.
Some newly added drivers did not set it properly, let's fix it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Donghwa Lee <dh09.lee@samsung.com>
Cc: InKi Dae <inki.dae@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agobacklight: add ams369fg06 amoled driver
Jingoo Han [Tue, 26 Jul 2011 00:12:00 +0000 (17:12 -0700)]
backlight: add ams369fg06 amoled driver

Add the ams369fg06 amoled panel driver.  The ams369fg06 amoled panel (480
x 800) driver uses 3-wired SPI inteface.  The brightness can be controlled
by gamma setting of amoled panel.

[sfr@canb.auug.org.au: fix build error]
[axel.lin@gmail.com: unregister backlight device when unloading the module]
[axel.lin@gmail.com: staticize ams369fg06_shutdown]
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: anish singh <anish198519851985@gmail.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/video/backlight/adp8860_bl.c: remove a redundant assignment for max_brightness
Axel Lin [Tue, 26 Jul 2011 00:11:59 +0000 (17:11 -0700)]
drivers/video/backlight/adp8860_bl.c: remove a redundant assignment for max_brightness

We have set props.max_brightness before registering backlight device.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/video/backlight/ld9040.c: small fixes
Axel Lin [Tue, 26 Jul 2011 00:11:58 +0000 (17:11 -0700)]
drivers/video/backlight/ld9040.c: small fixes

- Fix checking of wrong return value for backlight_device_register()

- Properly free allocated resources in ld9040_probe() error path and
  ld9040_remove().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Donghwa Lee <dh09.lee@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm/backing-dev.c: reset bdi min_ratio in bdi_unregister()
Peter Zijlstra [Tue, 26 Jul 2011 00:11:57 +0000 (17:11 -0700)]
mm/backing-dev.c: reset bdi min_ratio in bdi_unregister()

Vito said:

: The system has many usb disks coming and going day to day, with their
: respective bdi's having min_ratio set to 1 when inserted.  It works for
: some time until eventually min_ratio can no longer be set, even when the
: active set of bdi's seen in /sys/class/bdi/*/min_ratio doesn't add up to
: anywhere near 100.
:
: This then leads to an unrelated starvation problem caused by write-heavy
: fuse mounts being used atop the usb disks, a problem the min_ratio setting
: at the underlying devices bdi effectively prevents.

Fix this leakage by resetting the bdi min_ratio when unregistering the
BDI.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Reported-by: Vito Caputo <lkml@pengaru.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/misc/pch_phub.c: don't oops if dmi_get_system_info returns NULL
Alexander Stein [Tue, 26 Jul 2011 00:11:54 +0000 (17:11 -0700)]
drivers/misc/pch_phub.c: don't oops if dmi_get_system_info returns NULL

If dmi_get_system_info() returns NULL, pch_phub_probe() will dereferencea
a zero pointer.

This oops was observed on an Atom based board which has no BIOS, but a
bootloder which doesn't privde DMI data.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoxtensa: fix a build error in arch/xtensa/include/asm/uaccess.h
WANG Cong [Tue, 26 Jul 2011 00:11:54 +0000 (17:11 -0700)]
xtensa: fix a build error in arch/xtensa/include/asm/uaccess.h

Fix the following build error:

  arch/xtensa/include/asm/uaccess.h:403: error: implicit declaration of function 'prefetch'
  arch/xtensa/include/asm/uaccess.h:412: error: implicit declaration of function 'prefetchw'

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoxtensa: prevent arbitrary read in ptrace
Dan Rosenberg [Tue, 26 Jul 2011 00:11:53 +0000 (17:11 -0700)]
xtensa: prevent arbitrary read in ptrace

Prevent an arbitrary kernel read.  Check the user pointer with access_ok()
before copying data in.

[akpm@linux-foundation.org: s/EIO/EFAULT/]
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Christian Zankel <chris@zankel.net>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: use const struct page for r/o page-flag accessor methods
Ian Campbell [Tue, 26 Jul 2011 00:11:52 +0000 (17:11 -0700)]
mm: use const struct page for r/o page-flag accessor methods

In a subsquent patch I have a const struct page in my hand...

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomm: make some struct page's const
Ian Campbell [Tue, 26 Jul 2011 00:11:51 +0000 (17:11 -0700)]
mm: make some struct page's const

These uses are read-only and in a subsequent patch I have a const struct
page in my hand...

[akpm@linux-foundation.org: fix warnings in lowmem_page_address()]
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agohugetlb: add phys addr to struct huge_bootmem_page
Becky Bruce [Tue, 26 Jul 2011 00:11:50 +0000 (17:11 -0700)]
hugetlb: add phys addr to struct huge_bootmem_page

This is needed on HIGHMEM systems - we don't always have a virtual
address so store the physical address and map it in as needed.

[akpm@linux-foundation.org: cleanup]
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agofs/hugetlbfs/inode.c: fix pgoff alignment checking on 32-bit
Becky Bruce [Tue, 26 Jul 2011 00:11:49 +0000 (17:11 -0700)]
fs/hugetlbfs/inode.c: fix pgoff alignment checking on 32-bit

This:

    vma->vm_pgoff & ~(huge_page_mask(h) >> PAGE_SHIFT)

is incorrect on 32-bit.  It causes us to & the pgoff with something that
looks like this (for a 4m hugepage): 0xfff003ff.  The mask should be
flipped and *then* shifted, to give you 0x0000_03fff.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoipc/sem.c: fix race with concurrent semtimedop() timeouts and IPC_RMID
Manfred Spraul [Tue, 26 Jul 2011 00:11:47 +0000 (17:11 -0700)]
ipc/sem.c: fix race with concurrent semtimedop() timeouts and IPC_RMID

If a semaphore array is removed and in parallel a sleeping task is woken
up (signal or timeout, does not matter), then the woken up task does not
wait until wake_up_sem_queue_do() is completed.  This will cause crashes,
because wake_up_sem_queue_do() will read from a stale pointer.

The fix is simple: Regardless of anything, always call get_queue_result().
This function waits until wake_up_sem_queue_do() has finished it's task.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=27142

Reported-by: Yuriy Yevtukhov <yuriy@ucoz.com>
Reported-by: Harald Laabs <kernel@dasr.de>
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <stable@kernel.org> [2.6.35+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branches 'kbuild', 'packaging' and 'misc' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Tue, 26 Jul 2011 03:01:57 +0000 (20:01 -0700)]
Merge branches 'kbuild', 'packaging' and 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  genksyms: Use same type in loop comparison
  kbuild: silence generated makefile message
  kernel: prevent unnecessary rebuilding due to config_data.gz
  headers_install: fix __packed in exported kernel headers
  dtc: regen parser
  dtc: migrate parser to implicit rules
  kconfig: regen parser
  kconfig: migrate parser to implicit rules
  kconfig/zconf.l: do not ask to generate backup
  kconfig: kill no longer needed reference to YYDEBUG
  kconfig: constify `kconf_id_lookup'
  genksym: regen parser
  genksyms: migrate parser to implicit rules
  genksyms: drop -Wno-uninitialized from HOSTCFLAGS_parse.tab.o
  genksyms: pass hash and lookup functions name and target language though the input file
  kbuild: simplify the %_shipped rule
  kbuild: add implicit rules for parser generation
  kbuild: add `baseprereq'
  kbuild: Fix reference to vermagic.h

* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  package: Makefile: fix perf target bug

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  gitignore: ignore debian build directory

12 years agovfs: make gcc generate more obvious code for acl permission checking
Linus Torvalds [Tue, 26 Jul 2011 02:55:52 +0000 (19:55 -0700)]
vfs: make gcc generate more obvious code for acl permission checking

The "fsuid is the inode owner" case is not necessarily always the likely
case, but it's the case that doesn't do anything odd and that we want in
straight-line code.  Make gcc not generate random "jump around for the
fun of it" code.

This just helps me read profiles.  That thing is one of the hottest
parts of the whole pathname lookup.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Mon, 25 Jul 2011 21:10:34 +0000 (14:10 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (lm78) Become the maintainer
  hwmon: (lm78) Make ISA interface depend on CONFIG_ISA
  hwmon: (lm78) Avoid forward declarations
  hwmon: (sht15) Correct a comment mistake
  hwmon: (max1111) Avoid extra memory allocations
  hwmon: (it87) Add chassis intrusion detection support
  hwmon: (via-cputemp) Add VID reporting support
  hwmon-vid: Add support for VIA family 6 model D CPU
  hwmon: New driver sch5636
  hwmon: (sch5627) Factor out some code shared with sch5636 driver

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Linus Torvalds [Mon, 25 Jul 2011 20:56:39 +0000 (13:56 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  fs: Merge split strings
  treewide: fix potentially dangerous trailing ';' in #defined values/expressions
  uwb: Fix misspelling of neighbourhood in comment
  net, netfilter: Remove redundant goto in ebt_ulog_packet
  trivial: don't touch files that are removed in the staging tree
  lib/vsprintf: replace link to Draft by final RFC number
  doc: Kconfig: `to be' -> `be'
  doc: Kconfig: Typo: square -> squared
  doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
  drivers/net: static should be at beginning of declaration
  drivers/media: static should be at beginning of declaration
  drivers/i2c: static should be at beginning of declaration
  XTENSA: static should be at beginning of declaration
  SH: static should be at beginning of declaration
  MIPS: static should be at beginning of declaration
  ARM: static should be at beginning of declaration
  rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
  Update my e-mail address
  PCIe ASPM: forcedly -> forcibly
  gma500: push through device driver tree
  ...

Fix up trivial conflicts:
 - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
 - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
 - drivers/net/r8169.c (just context changes)

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Mon, 25 Jul 2011 19:53:15 +0000 (12:53 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  fs: take the ACL checks to common code
  bury posix_acl_..._masq() variants
  kill boilerplates around posix_acl_create_masq()
  generic_acl: no need to clone acl just to push it to set_cached_acl()
  kill boilerplate around posix_acl_chmod_masq()
  reiserfs: cache negative ACLs for v1 stat format
  xfs: cache negative ACLs if there is no attribute fork
  9p: do no return 0 from ->check_acl without actually checking
  vfs: move ACL cache lookup into generic code
  CIFS: Fix oops while mounting with prefixpath
  xfs: Fix wrong return value of xfs_file_aio_write
  fix devtmpfs race
  caam: don't pass bogus S_IFCHR to debugfs_create_...()
  get rid of create_proc_entry() abuses - proc_mkdir() is there for purpose
  asus-wmi: ->is_visible() can't return negative
  fix jffs2 ACLs on big-endian with 16bit mode_t
  9p: close ACL leaks
  ocfs2_init_acl(): fix a leak
  VFS : mount lock scalability for internal mounts

12 years agohwmon: (lm78) Become the maintainer
Jean Delvare [Mon, 25 Jul 2011 19:46:11 +0000 (21:46 +0200)]
hwmon: (lm78) Become the maintainer

Declare myself the maintainer of the lm78 driver. I still have a
running system with one of these chips.

Also count myself as a co-author of the driver. With 34 commits over
6 years, it seems fair.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (lm78) Make ISA interface depend on CONFIG_ISA
Jean Delvare [Mon, 25 Jul 2011 19:46:11 +0000 (21:46 +0200)]
hwmon: (lm78) Make ISA interface depend on CONFIG_ISA

We should only include support for the ISA interface of the LM78/LM79
if CONFIG_ISA is set. Not only this makes the driver somewhat smaller
on most architectures, but this also avoids poking at random I/O
ports on these architectures.

This is very similiar to what was done for the w83781d driver in
October 2008.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Dean Nelson <dnelson@redhat.com>
12 years agohwmon: (lm78) Avoid forward declarations
Jean Delvare [Mon, 25 Jul 2011 19:46:11 +0000 (21:46 +0200)]
hwmon: (lm78) Avoid forward declarations

Move code around to avoid several forward declarations. Also group
ISA-related functions together, to make future changes easier.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Dean Nelson <dnelson@redhat.com>
12 years agohwmon: (sht15) Correct a comment mistake
Vivien Didelot [Mon, 25 Jul 2011 19:46:10 +0000 (21:46 +0200)]
hwmon: (sht15) Correct a comment mistake

sht15_store_heater() is called on _write_ access to heater_enable.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (max1111) Avoid extra memory allocations
Jean Delvare [Mon, 25 Jul 2011 19:46:10 +0000 (21:46 +0200)]
hwmon: (max1111) Avoid extra memory allocations

We can allocate the tx and rx buffers as part of our data structure.
Doing so is faster and spares memory.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Stanislav Brabec <utx@penguin.cz>
12 years agohwmon: (it87) Add chassis intrusion detection support
Jean Delvare [Mon, 25 Jul 2011 19:46:10 +0000 (21:46 +0200)]
hwmon: (it87) Add chassis intrusion detection support

Add chassis intrusion detection support for all supported devices,
using the standard interface.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (via-cputemp) Add VID reporting support
Jean Delvare [Mon, 25 Jul 2011 19:46:10 +0000 (21:46 +0200)]
hwmon: (via-cputemp) Add VID reporting support

At least VIA family 6 model D CPU report the VID settings in a MSR,
so expose the value to user-space. Not sure about model A.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Tested-by: Jeff Rickman <jrickman@myamigos.us>
12 years agohwmon-vid: Add support for VIA family 6 model D CPU
Jean Delvare [Mon, 25 Jul 2011 19:46:10 +0000 (21:46 +0200)]
hwmon-vid: Add support for VIA family 6 model D CPU

The VIA family 6 model D CPU (C7-D, Eden 90 nm) can use two different
VID tables, we have to check the value of a MSR to decide which one to
use.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Tested-by: Jeff Rickman <jrickman@myamigos.us>
12 years agohwmon: New driver sch5636
Hans de Goede [Mon, 25 Jul 2011 19:46:09 +0000 (21:46 +0200)]
hwmon: New driver sch5636

This patch adds a new driver for SMSC SCH5636 Super I/O chips.
The chips include an embedded microcontroller for hardware monitoring
solutions, allowing motherboard manufacturers to create their own
custom hwmon solution based upon the SCH5636.

Currently the sch5636 driver only supports the Fujitsu Theseus SCH5636
based hwmon solution. The sch5636 driver runs a sanity check on
loading to ensure it is dealing with a Fujitsu Theseus and not with
another custom SCH5636 based hwmon solution.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (sch5627) Factor out some code shared with sch5636 driver
Hans de Goede [Mon, 25 Jul 2011 19:46:09 +0000 (21:46 +0200)]
hwmon: (sch5627) Factor out some code shared with sch5636 driver

This patch adds a new sch56xx-common.ko which contains code which will also
be used in the new sch5636 driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agoMerge branch 'next/deletion' of git+ssh://master.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 25 Jul 2011 19:43:28 +0000 (12:43 -0700)]
Merge branch 'next/deletion' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc

* 'next/deletion' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc:
  ARM: mach-loki: delete
  ARM: mach-s3c2400: delete
  ARM: mach-s3c24a0: delete

12 years agoMerge branch 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Mon, 25 Jul 2011 19:38:42 +0000 (12:38 -0700)]
Merge branch 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc

* 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (133 commits)
  ARM: EXYNOS4: Change devname for FIMD clkdev
  ARM: S3C64XX: Cleanup mach/regs-fb.h from mach-s3c64xx
  ARM: S5PV210: Cleanup mach/regs-fb.h from mach-s5pv210
  ARM: S5PC100: Cleanup mach/regs-fb.h from mach-s5pc100
  ARM: S3C24XX: Use generic s3c_set_platdata for devices
  ARM: S3C64XX: Use generic s3c_set_platdata for OneNAND
  ARM: SAMSUNG: Use generic s3c_set_platdata for NAND
  ARM: SAMSUNG: Use generic s3c_set_platdata for USB OHCI
  ARM: SAMSUNG: Use generic s3c_set_platdata for HWMON
  ARM: SAMSUNG: Use generic s3c_set_platdata for FB
  ARM: SAMSUNG: Use generic s3c_set_platdata for TS
  ARM: S3C64XX: Add PWM backlight support on SMDK6410
  ARM: S5P64X0: Add PWM backlight support on SMDK6450
  ARM: S5P64X0: Add PWM backlight support on SMDK6440
  ARM: S5PC100: Add PWM backlight support on SMDKC100
  ARM: S5PV210: Add PWM backlight support on SMDKV210
  ARM: EXYNOS4: Add PWM backlight support on SMDKC210
  ARM: EXYNOS4: Add PWM backlight support on SMDKV310
  ARM: SAMSUNG: Create a common infrastructure for PWM backlight support
  clocksource: convert 32-bit down counting clocksource on S5PV210/S5P64X0
  ...

Fix up trivial conflict in arch/arm/mach-imx/mach-scb9328.c

12 years agoMerge branch 'next/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux...
Linus Torvalds [Mon, 25 Jul 2011 18:53:35 +0000 (11:53 -0700)]
Merge branch 'next/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc

* 'next/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (35 commits)
  ARM: msm: platsmp: determine number of CPU cores at boot time
  ARM: Tegra: Seaboard: Fix I2C bus numbering for ADT7461
  ARM: Tegra: Trimslice: Tri-state DAP3 pinmux
  ARM: orion5x: fixup 5181 MPP mask check
  ARM: mxs-dma: include <linux/dmaengine.h>
  ARM: i.MX53: consistently use MX53_UART_PAD_CTRL for uart txd/rxd/rts/cts
  ARM: i.MX53: UARTn_CTS pin should not change RTS input select
  ARM: i.MX53: UARTn_TXD pin should not change RXD input select
  ARM: mx25: Fix typo on CAN1_RX pad setting
  iomux-mx53: add missing 'IOMUX_CONFIG_SION' for some I2C pad definitions
  ARM: NUC93X: add UL suffix to VMALLOC_END to ensure it is properly typed
  ARM: LPC32XXX: add UL suffix to VMALLOC_END to ensure it is properly typed
  ARM: CNS3XXX: add UL suffix to VMALLOC_END to ensure it is properly typed
  ARM: i.MX53: Fix IOMUX type o's
  ARM i.MX dma: Fix burstsize settings
  mach-mx5: fix the I2C clock parents
  ARM: mxs/tx28: according to the TX28's datasheet D4-D7 are not used for MMC0
  ARM i.MX23/28: platform-mxsfb: Add missing include of linux/dma-mapping.h
  ARM: mx53: Fix some interrupts marked as reserved.
  MXC: iomux-v3: correct NO_PAD_CTRL definition
  ...

Fix up trivial conflict in arch/arm/mach-imx/mach-mx31_3ds.c

12 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Mon, 25 Jul 2011 18:40:24 +0000 (11:40 -0700)]
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Allow i2c_add_numbered_adapter() to assign a bus id
  i2c-ali1535: Fix style issues

12 years agofs: take the ACL checks to common code
Christoph Hellwig [Sat, 23 Jul 2011 15:37:31 +0000 (17:37 +0200)]
fs: take the ACL checks to common code

Replace the ->check_acl method with a ->get_acl method that simply reads an
ACL from disk after having a cache miss.  This means we can replace the ACL
checking boilerplate code with a single implementation in namei.c.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agobury posix_acl_..._masq() variants
Al Viro [Sat, 23 Jul 2011 07:27:37 +0000 (03:27 -0400)]
bury posix_acl_..._masq() variants

made static; no callers left outside of posix_acl.c.  posix_acl_clone() also
has lost all external callers and became static...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agokill boilerplates around posix_acl_create_masq()
Al Viro [Sat, 23 Jul 2011 07:10:32 +0000 (03:10 -0400)]
kill boilerplates around posix_acl_create_masq()

new helper: posix_acl_create(&acl, gfp, mode_p).  Replaces acl with
modified clone, on failure releases acl and replaces with NULL.
Returns 0 or -ve on error.  All callers of posix_acl_create_masq()
switched.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agogeneric_acl: no need to clone acl just to push it to set_cached_acl()
Al Viro [Sat, 23 Jul 2011 06:41:54 +0000 (02:41 -0400)]
generic_acl: no need to clone acl just to push it to set_cached_acl()

In-core acls are copy-on-write, so the reference taken by set_cached_acl() will
do just fine.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agokill boilerplate around posix_acl_chmod_masq()
Al Viro [Sat, 23 Jul 2011 04:18:02 +0000 (00:18 -0400)]
kill boilerplate around posix_acl_chmod_masq()

new helper: posix_acl_chmod(&acl, gfp, mode).  Replaces acl with modified
clone or with NULL if that has failed; returns 0 or -ve on error.  All
callers of posix_acl_chmod_masq() switched to that - they'd been doing
exactly the same thing.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoreiserfs: cache negative ACLs for v1 stat format
Christoph Hellwig [Sat, 23 Jul 2011 15:37:03 +0000 (17:37 +0200)]
reiserfs: cache negative ACLs for v1 stat format

Always set up a negative ACL cache entry if the inode can't have ACLs.
That behaves much better than doing this check inside ->check_acl.

Also remove the left over MAY_NOT_BLOCK check.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoxfs: cache negative ACLs if there is no attribute fork
Christoph Hellwig [Sat, 23 Jul 2011 15:36:50 +0000 (17:36 +0200)]
xfs: cache negative ACLs if there is no attribute fork

Always set up a negative ACL cache entry if the inode doesn't have an
attribute fork.  That behaves much better than doing this check inside
->check_acl.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years ago9p: do no return 0 from ->check_acl without actually checking
Christoph Hellwig [Sat, 23 Jul 2011 15:36:38 +0000 (17:36 +0200)]
9p: do no return 0 from ->check_acl without actually checking

If we do not want to use ACLs we at least need to perform normal Unix
permission checks.  From the comment I'm not quite sure that's what
is intended, but if 0p wants to do permission checks entirely on the
server it needs to do so in ->permission, not in ->check_acl.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agovfs: move ACL cache lookup into generic code
Linus Torvalds [Sat, 23 Jul 2011 02:30:19 +0000 (19:30 -0700)]
vfs: move ACL cache lookup into generic code

This moves logic for checking the cached ACL values from low-level
filesystems into generic code.  The end result is a streamlined ACL
check that doesn't need to load the inode->i_op->check_acl pointer at
all for the common cached case.

The filesystems also don't need to check for a non-blocking RCU walk
case in their acl_check() functions, because that is all handled at a
VFS layer.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoCIFS: Fix oops while mounting with prefixpath
Pavel Shilovsky [Mon, 25 Jul 2011 13:59:10 +0000 (17:59 +0400)]
CIFS: Fix oops while mounting with prefixpath

commit fec11dd9a0109fe52fd631e5c510778d6cbff6cc caused
a regression when we have already mounted //server/share/a
and want to mount //server/share/a/b.

The problem is that lookup_one_len calls __lookup_hash
with nd pointer as NULL. Then __lookup_hash calls
do_revalidate in the case when dentry exists and we end
up with NULL pointer deference in cifs_d_revalidate:

if (nd->flags & LOOKUP_RCU)
return -ECHILD;

Fix this by checking nd for NULL.

Signed-off-by: Pavel Shilovsky <piastryyy@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoxfs: Fix wrong return value of xfs_file_aio_write
Markus Trippelsdorf [Sun, 24 Jul 2011 12:03:30 +0000 (14:03 +0200)]
xfs: Fix wrong return value of xfs_file_aio_write

The fsync prototype change commit 02c24a82187d accidentally overwrote
the ssize_t return value of xfs_file_aio_write with 0 for SYNC type
writes. Fix this by checking if an error occured when calling
xfs_file_fsync and only change the return value in this case.
In addition xfs_file_fsync actually returns a normal negative error, so
fix this, too.

Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agofix devtmpfs race
Al Viro [Mon, 25 Jul 2011 18:15:50 +0000 (14:15 -0400)]
fix devtmpfs race

After we's done complete(&req->done), there's nothing to prevent the
scope containing *req from being gone and *req overwritten by any
kind of junk.  So we must read req->next before that...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoMerge branch 'for-3.1/drivers' of git://git.kernel.dk/linux-block
Linus Torvalds [Mon, 25 Jul 2011 17:38:18 +0000 (10:38 -0700)]
Merge branch 'for-3.1/drivers' of git://git.kernel.dk/linux-block

* 'for-3.1/drivers' of git://git.kernel.dk/linux-block:
  cciss: do not attempt to read from a write-only register
  xen/blkback: Add module alias for autoloading
  xen/blkback: Don't let in-flight requests defer pending ones.
  bsg: fix address space warning from sparse
  bsg: remove unnecessary conditional expressions
  bsg: fix bsg_poll() to return POLLOUT properly

12 years agoMerge branch 'for-3.1/core' of git://git.kernel.dk/linux-block
Linus Torvalds [Mon, 25 Jul 2011 17:33:36 +0000 (10:33 -0700)]
Merge branch 'for-3.1/core' of git://git.kernel.dk/linux-block

* 'for-3.1/core' of git://git.kernel.dk/linux-block: (24 commits)
  block: strict rq_affinity
  backing-dev: use synchronize_rcu_expedited instead of synchronize_rcu
  block: fix patch import error in max_discard_sectors check
  block: reorder request_queue to remove 64 bit alignment padding
  CFQ: add think time check for group
  CFQ: add think time check for service tree
  CFQ: move think time check variables to a separate struct
  fixlet: Remove fs_excl from struct task.
  cfq: Remove special treatment for metadata rqs.
  block: document blk_plug list access
  block: avoid building too big plug list
  compat_ioctl: fix make headers_check regression
  block: eliminate potential for infinite loop in blkdev_issue_discard
  compat_ioctl: fix warning caused by qemu
  block: flush MEDIA_CHANGE from drivers on close(2)
  blk-throttle: Make total_nr_queued unsigned
  block: Add __attribute__((format(printf...) and fix fallout
  fs/partitions/check.c: make local symbols static
  block:remove some spare spaces in genhd.c
  block:fix the comment error in blkdev.h
  ...

12 years agoiomap: make IOPORT/PCI mapping functions conditional
Randy Dunlap [Sun, 24 Jul 2011 18:39:14 +0000 (11:39 -0700)]
iomap: make IOPORT/PCI mapping functions conditional

When CONFIG_PCI is not enabled, CONFIG_EISA=y, and CONFIG_GENERIC_IOMAP=y,
drivers/net/3c59x.c build fails due to a recent small change to
<asm-generic/iomap.h> that surrounds pci_iomap() and pci_iounmap() with
#ifdef CONFIG_PCI/#endif.

Since that patch to iomap.h looks correct, add stubs for pci_iomap() and
pci_iounmap() with CONFIG_PCI is not enabled to fix the build errors.

  drivers/net/3c59x.c:1026: error: implicit declaration of function 'pci_iomap'
  drivers/net/3c59x.c:1038: error: implicit declaration of function 'pci_iounmap'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoi2c: Allow i2c_add_numbered_adapter() to assign a bus id
Grant Likely [Mon, 25 Jul 2011 15:49:43 +0000 (17:49 +0200)]
i2c: Allow i2c_add_numbered_adapter() to assign a bus id

Currently, if an i2c bus driver supports both static and dynamic bus
ids, it needs to choose between calling i2c_add_numbered_adapter() and
i2c_add_adapter().  This patch makes i2c_add_numbered_adapter()
redirect to i2c_add_adapter() if the requested bus id is -1.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agoi2c-ali1535: Fix style issues
LABBE Corentin [Mon, 25 Jul 2011 15:49:42 +0000 (17:49 +0200)]
i2c-ali1535: Fix style issues

This is a fix-style patch for i2c-ali1535 (issues reported by
checkpatch.pl.)

Signed-off-by: LABBE Corentin <corentin.labbe@geomatys.fr>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agoMerge branch 'tegra/fixes' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Mon, 25 Jul 2011 15:16:00 +0000 (17:16 +0200)]
Merge branch 'tegra/fixes' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc into next/fixes

12 years agogenksyms: Use same type in loop comparison
Jesper Juhl [Mon, 11 Jul 2011 22:32:04 +0000 (00:32 +0200)]
genksyms: Use same type in loop comparison

The ARRAY_SIZE macro in scripts/genksyms/genksyms.c returns a value of
type size_t. That value is being compared to a variable of type int in
a loop in read_node(). Change the int variable to size_t type as well,
so we don't do signed vs unsigned type comparisons with all the
potential promotion/sign extension trouble that can cause (also
silences compiler warnings at high levels of warnings).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Mon, 25 Jul 2011 03:56:18 +0000 (20:56 -0700)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] s5pv210: make needlessly global symbols static
  [CPUFREQ] exynos4210: make needlessly global symbols static
  [CPUFREQ] S3C6410: Add some lower frequencies for 800MHz base clock operation
  [CPUFREQ] S5PV210: Add reboot notifier to prevent system hang
  [CPUFREQ] S5PV210: Adjust udelay prior to voltage scaling down
  [CPUFREQ] S5PV210: Lock a mutex while changing the cpu frequency
  [CPUFREQ] S5PV210: Add pm_notifier to prevent system unstable
  [CPUFREQ] S5PV210: Add arm/int voltage control support
  [CPUFREQ] S5PV210: Add additional symantics for "relation" in cpufreq with pm
  [CPUFREQ] S3C64xx: Notify transition complete as soon as frequency changed
  [CPUFREQ] S3C6410: Support 800MHz operation in cpufreq
  [CPUFREQ] s5pv210-cpufreq.c: Add missing clk_put
  [CPUFREQ] Move compile for S3C64XX cpufreq to /drivers/cpufreq
  [CPUFREQ] Remove some vi noise that escaped into the Makefile.
  [CPUFREQ] Move ARM Samsung cpufreq drivers to drivers/cpufreq/
  [CPUFREQ/S3C64xx] Move S3C64xx CPUfreq driver into drivers/cpufreq
  [CPUFREQ] Handle CPUs with different capabilities in acpi-cpufreq

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Mon, 25 Jul 2011 03:55:48 +0000 (20:55 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (145 commits)
  bnx2x: use pci_pcie_cap()
  bnx2x: fix bnx2x_stop_on_error flow in bnx2x_sp_rtnl_task
  bnx2x: enable internal target-read for 57712 and up only
  bnx2x: count statistic ramrods on EQ to prevent MC assert
  bnx2x: fix loopback for non 10G link
  bnx2x: dcb - send all unmapped priorities to same COS as L2
  iwlwifi: Fix build with CONFIG_PM disabled.
  gre: fix improper error handling
  ipv4: use RT_TOS after some rt_tos conversions
  via-velocity: remove duplicated #include
  qlge: remove duplicated #include
  igb: remove duplicated #include
  can: c_can: remove duplicated #include
  bnad: remove duplicated #include
  net: allow netif_carrier to be called safely from IRQ
  bna: Header File Consolidation
  bna: HW Error Counter Fix
  bna: Add HW Semaphore Unlock Logic
  bna: IOC Event Name Change
  bna: Mboxq Flush When IOC Disabled
  ...

12 years agogma500: udlay(20000) is too large
Stephen Rothwell [Mon, 25 Jul 2011 01:13:13 +0000 (11:13 +1000)]
gma500: udlay(20000) is too large

So use mdelay(20) instead.  Fixes this build error:

  ERROR: "__bad_udelay" [drivers/staging/gma500/psb_gfx.ko] undefined!

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agom68k: Revive reporting of spurious interrupts
Geert Uytterhoeven [Wed, 13 Jul 2011 18:29:24 +0000 (20:29 +0200)]
m68k: Revive reporting of spurious interrupts

commit 2502b667ea835ee16685c74b2a0d89ba8afe117a ("Change the m68knommu irq
handling to use the generic irq framework.") removed the reporting of spurious
interrupts on nommu (68328 and 68360).

Bring it back in a generic way, using "atomic_t irq_err_count", as that's what
most of the other architectures are using.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68knommu: Move forward declaration of do_IRQ() from machdep.h to irq.h
Geert Uytterhoeven [Sun, 3 Jul 2011 09:09:57 +0000 (11:09 +0200)]
m68knommu: Move forward declaration of do_IRQ() from machdep.h to irq.h

It is not machine-specific, but common irq infrastructure.
Also add the missing asmlinkage, to match its definition.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68k: fix some atomic operation asm address modes for ColdFire
Greg Ungerer [Mon, 4 Jul 2011 05:30:55 +0000 (15:30 +1000)]
m68k: fix some atomic operation asm address modes for ColdFire

The ColdFire processors have a much more limited set of addressing modes
that can be used for most instructions. A number of the atomic operations
have already been fixed to limit the addressing modes used with add and
sub instructions when building for ColdFire. But we missed a few.
Fix the remaining atomic operations to be clean for ColdFire processors.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68k: use CPU_HAS_NO_BITFIELDS for signal functions
Greg Ungerer [Mon, 4 Jul 2011 04:23:09 +0000 (14:23 +1000)]
m68k: use CPU_HAS_NO_BITFIELDS for signal functions

When reworking bitops.h to be clean for all processor types we introduced
a CONFIG_CPU_HAS_NO_BITFIELDS define to signal whether this processor type
supported the bit field instructions. The ARCH_SIG_BITOPS functions for
m68k use these instruction types. We should base the use of these functions
(or the generic versions) on the CONFIG_CPU_HAS_NO_BITFIELDS define.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68k: merge and clean up delay.h files
Greg Ungerer [Fri, 1 Jul 2011 06:47:13 +0000 (16:47 +1000)]
m68k: merge and clean up delay.h files

The real difference between the mmu and non-mmu varients of the delay.h
files has nothing to do with having an mmu or not. It is processor family
differences that means slightly different code. Merge the delay_mm.h and
delay_no.h files back into a single file.

The primarly difference we need to deal with is whether the processor
supports a 32bit * 32bit -> 64bit multiply. Without it we need to do some
shift scaling as well as use a 32bit * 32bit -> 32bit multiply. If building
for a multi-CPU type kernel then we must use the simpler mult/shift scaling.

This version of delay code allows the CPU32 family to use a 64bit mul,
since it supports this instruction, the old code did not.

The changes use macros where appropriate to try and optimize constant sized
udelay times. And it removes the use of a fixed lib function for the non-mmu
case. Code size on typical kernel configurations is similar, or only larger
by a few tens of bytes.

Also removed the unused muldiv() code from delay_mm.h.

Build and run tested on ColdFire and ARAnyM. Build tested only on 68328
and 68360 (CPU32).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68knommu: correctly use trap_init
Greg Ungerer [Thu, 23 Jun 2011 05:52:25 +0000 (15:52 +1000)]
m68knommu: correctly use trap_init

Currently trap_init() is an empty function for m68knommu. Instead
the vectors are being setup as part of the IRQ initialization.
This is inconsistent with m68k and other architectures.

Change the local init_vectors() to be trap_init(), and init the
vectors at the correct time during startup. This will help merge of
m68k and m68knommu trap code in the furture.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68knommu: merge ColdFire 5206 and 5206e platform code
Greg Ungerer [Mon, 6 Jun 2011 03:33:11 +0000 (13:33 +1000)]
m68knommu: merge ColdFire 5206 and 5206e platform code

The ColdFire 5206 and 5206e CPU families are almost identical, we can
easily merge the platform support code for them. All the differences
are dealt with in the current include/asm/5206sim.h.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68k: merge mmu and non-mmu bitops.h
Greg Ungerer [Tue, 17 May 2011 06:45:00 +0000 (16:45 +1000)]
m68k: merge mmu and non-mmu bitops.h

The following patch merges the mmu and non-mmu versions of the m68k
bitops.h files. Now there is a good deal of difference between the two
files, but none of it is actually an mmu specific difference. It is
all about the specific m68k/coldfire varient we are targeting. So it
makes an awful lot of sense to merge these into a single bitops.h.

There is a number of ways I can see to factor this code. The approach
I have taken here is to keep the various versions of each macro/function
type together. This means that there is some ifdefery with each to handle
each CPU type.

I have added some comments in a couple of appropriate places to try
and make it clear what the differences we are dealing with are.
Specifically the instruction and addressing mode differences we have
to deal with.

The merged form keeps the same underlying optimizations for each CPU
type for all the general bit clear/set/change and find bit operations.
It does switch to using the generic le operations though, instead of
any local varients.

Build tested on ColdFire, 68328, 68360 (which is cpu32) and 68020+.
Run tested on ColdFire and ARAnyM.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k: merge MMU and non MMU versions of system.h
Greg Ungerer [Thu, 5 May 2011 12:32:12 +0000 (22:32 +1000)]
m68k: merge MMU and non MMU versions of system.h

The non-MMU m68k targets can use the same asm/system.h as the MMU
targets. So switch the current system_mm.h to be system.h and remove
system_no.h.

The assembly support code for the non-MMU resume functions needs to
be modified to match the now common switch_to() macro. Specifically
this means correctly saving and restoring the status flags in the case
of the ColdFire resume, and some reordering of the code to not use
registers before they are saved or after they are restored.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68k: merge MMU and non-MMU versions of asm/hardirq.h
Greg Ungerer [Wed, 4 May 2011 03:55:56 +0000 (13:55 +1000)]
m68k: merge MMU and non-MMU versions of asm/hardirq.h

The contents of asm/hardirq.h are pretty strait forward for both the
MMU (hardirq_mm.h) and non-MMU (hardirq_no.h) include files. Merge the
two back into a single file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68k: merge the non-mmu and mmu versions of module.c
Greg Ungerer [Tue, 29 Mar 2011 05:23:51 +0000 (15:23 +1000)]
m68k: merge the non-mmu and mmu versions of module.c

The non-mmu and mmu versions of the module loader module.c are
nearly identical. Merge them back to a single module.c. There is
a little bit of re-ordering of the struct and enum definitions in
module.h to keep the ifdefery to a minimum.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68knommu: Fix printk() format in free_initrd_mem()
Geert Uytterhoeven [Thu, 26 May 2011 04:44:10 +0000 (14:44 +1000)]
m68knommu: Fix printk() format in free_initrd_mem()

arch/m68k/mm/init_no.c:123: warning: format "%d" expects type "int", but argument 2 has type "long unsigned int"

And use pr_notice() while we're at it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agom68knommu: Make empty_zero_page "void *", like on m68k
Geert Uytterhoeven [Wed, 25 May 2011 09:10:59 +0000 (11:10 +0200)]
m68knommu: Make empty_zero_page "void *", like on m68k

This allows to get rid of the casts.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
12 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Sun, 24 Jul 2011 21:34:01 +0000 (14:34 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ata: PATA_ARASAN_CF depends on DMADEVICES
  ata: remove unnecessary code
  [libata] Prevent warning during PMP error recovery
  ahci: RAID-mode SATA patch for Intel Panther Point DeviceIDs
  pata_it821x: Fix RAID type display, by adding missing comma
  sata_dwc_460ex: fix error path
  ahci: Enable SB600 64bit DMA on Asus M3A
  libata: report link resume failure as KERN_WARNING instead of ERR
  ahci: move ahci_sb600_softreset to libahci.c and rename it
  libata: leave port thawed after reset failure
  ata: sata_via: Use dev_dbg
  ata: Add and use ata_print_version_once
  ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level>
  ata: Convert dev_printk(KERN_<LEVEL> to dev_<level>(

12 years agobnx2x: use pci_pcie_cap()
Vladislav Zolotarov [Sun, 24 Jul 2011 03:58:38 +0000 (03:58 +0000)]
bnx2x: use pci_pcie_cap()

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: fix bnx2x_stop_on_error flow in bnx2x_sp_rtnl_task
Vladislav Zolotarov [Sun, 24 Jul 2011 03:57:46 +0000 (03:57 +0000)]
bnx2x: fix bnx2x_stop_on_error flow in bnx2x_sp_rtnl_task

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: enable internal target-read for 57712 and up only
Shmulik Ravid [Sun, 24 Jul 2011 03:57:04 +0000 (03:57 +0000)]
bnx2x: enable internal target-read for 57712 and up only

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: count statistic ramrods on EQ to prevent MC assert
Vladislav Zolotarov [Sun, 24 Jul 2011 03:54:17 +0000 (03:54 +0000)]
bnx2x: count statistic ramrods on EQ to prevent MC assert

This patch includes:
 - Counting statistics ramrods as EQ ramrods the way they should be. This
   accounting is meant to prevent MC asserts in case of software bugs.
 - Fixes in debug facilities which were added while working on one of such
   bugs.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: fix loopback for non 10G link
Yaniv Rosner [Sun, 24 Jul 2011 03:53:21 +0000 (03:53 +0000)]
bnx2x: fix loopback for non 10G link

Also fixes minor formatting in that function.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: dcb - send all unmapped priorities to same COS as L2
Dmitry Kravkov [Sun, 24 Jul 2011 04:09:43 +0000 (04:09 +0000)]
bnx2x: dcb - send all unmapped priorities to same COS as L2

As a result of DCBX negotiation some priorities maybe untouched and still
unmapped to any COS; instead of sending them to COS0 we assign them
to the same COS as L2 traffic - to avoid collisions with storage class of
service.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoiwlwifi: Fix build with CONFIG_PM disabled.
David S. Miller [Sun, 24 Jul 2011 20:09:32 +0000 (13:09 -0700)]
iwlwifi: Fix build with CONFIG_PM disabled.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sun, 24 Jul 2011 17:20:54 +0000 (10:20 -0700)]
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm

* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (237 commits)
  ARM: 7004/1: fix traps.h compile warnings
  ARM: 6998/2: kernel: use proper memory barriers for bitops
  ARM: 6997/1: ep93xx: increase NR_BANKS to 16 for support of 128MB RAM
  ARM: Fix build errors caused by adding generic macros
  ARM: CPU hotplug: ensure we migrate all IRQs off a downed CPU
  ARM: CPU hotplug: pass in proper affinity mask on IRQ migration
  ARM: GIC: avoid routing interrupts to offline CPUs
  ARM: CPU hotplug: fix abuse of irqdesc->node
  ARM: 6981/2: mmci: adjust calculation of f_min
  ARM: 7000/1: LPAE: Use long long printk format for displaying the pud
  ARM: 6999/1: head, zImage: Always Enter the kernel in ARM state
  ARM: btc: avoid invalidating the branch target cache on kernel TLB maintanence
  ARM: ARM_DMA_ZONE_SIZE is no more
  ARM: mach-shark: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
  ARM: mach-sa1100: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
  ARM: mach-realview: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
  ARM: mach-pxa: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
  ARM: mach-ixp4xx: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
  ARM: mach-h720x: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
  ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
  ...

12 years agoDocumentation: Update augmented rbtree documentation
Sasha Levin [Sun, 24 Jul 2011 08:23:20 +0000 (11:23 +0300)]
Documentation: Update augmented rbtree documentation

Current documentation referred to the old method of handling augmented
trees.  Update documentation to correspond with the changes done in
commit b945d6b2554d ("rbtree: Undo augmented trees performance damage
and regression").

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: David Woodhouse <David.Woodhouse@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoXZ: Fix missing <linux/kernel.h> include
Lasse Collin [Sun, 24 Jul 2011 16:54:25 +0000 (19:54 +0300)]
XZ: Fix missing <linux/kernel.h> include

<linux/kernel.h> is needed for min_t. The old version
happened to work on x86 because <asm/unaligned.h>
indirectly includes <linux/kernel.h>, but it didn't
work on ARM.

<linux/kernel.h> includes <asm/byteorder.h> so it's
not necessary to include it explicitly anymore.

Signed-off-by: Lasse Collin <lasse.collin@tukaani.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sun, 24 Jul 2011 16:55:45 +0000 (09:55 -0700)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (21 commits)
  [S390] use siginfo for sigtrap signals
  [S390] dasd: add enhanced DASD statistics interface
  [S390] kvm: make sigp emerg smp capable
  [S390] disable cpu measurement alerts on a dying cpu
  [S390] initial cr0 bits
  [S390] iucv cr0 enablement bit
  [S390] race safe external interrupt registration
  [S390] remove tape block docu
  [S390] ap: toleration support for ap device type 10
  [S390] cleanup program check handler prototypes
  [S390] remove kvm mmu reload on s390
  [S390] Use gmap translation for accessing guest memory
  [S390] use gmap address spaces for kvm guest images
  [S390] kvm guest address space mapping
  [S390] fix s390 assembler code alignments
  [S390] move sie code to entry.S
  [S390] kvm: handle tprot intercepts
  [S390] qdio: clear shared DSCI before scheduling the queue handler
  [S390] reference bit testing for unmapped pages
  [S390] irqs: Do not trace arch_local_{*,irq_*} functions
  ...

12 years agoMerge branch 'for-upstream' of git://openrisc.net/jonas/linux
Linus Torvalds [Sun, 24 Jul 2011 16:55:18 +0000 (09:55 -0700)]
Merge branch 'for-upstream' of git://openrisc.net/jonas/linux

* 'for-upstream' of git://openrisc.net/jonas/linux: (24 commits)
  OpenRISC: Add MAINTAINERS entry
  OpenRISC: Miscellaneous
  OpenRISC: Library routines
  OpenRISC: Headers
  OpenRISC: Traps
  OpenRISC: Module support
  OpenRISC: GPIO
  OpenRISC: Scheduling/Process management
  OpenRISC: Idle/Power management
  OpenRISC: System calls
  OpenRISC: IRQ
  OpenRISC: Timekeeping
  OpenRISC: DMA
  OpenRISC: PTrace
  OpenRISC: Build infrastructure
  OpenRISC: Signal handling
  OpenRISC: Memory management
  OpenRISC: Device tree
  OpenRISC: Boot code
  iomap: make IOPORT/PCI mapping functions conditional
  ...

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Sun, 24 Jul 2011 16:54:54 +0000 (09:54 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  modpost: Fix modpost's license checking V3
  module: add /sys/module/<name>/uevent files
  module: change attr callbacks to take struct module_kobject
  modules: make arch's use default loader hooks
  modules: add default loader hook implementations
  param: fix return value handling in param_set_*