deliverable/linux.git
13 years agohrtimers: Avoid touching inactive timer bases
Thomas Gleixner [Fri, 20 May 2011 11:05:15 +0000 (13:05 +0200)] 
hrtimers: Avoid touching inactive timer bases

Instead of iterating over all possible timer bases avoid it by marking
the active bases in the cpu base.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
13 years agohrtimers: Make struct hrtimer_cpu_base layout less stupid
Thomas Gleixner [Fri, 20 May 2011 11:02:58 +0000 (13:02 +0200)] 
hrtimers: Make struct hrtimer_cpu_base layout less stupid

In the HIGHRES=y case we access the members at the end of struct
hrtimer_cpu_base first and then the one at the beginning. Move the
hrtimer data to front, so we have linear progressing access.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
13 years agotimerfd: Manage cancelable timers in timerfd
Thomas Gleixner [Fri, 20 May 2011 14:18:50 +0000 (16:18 +0200)] 
timerfd: Manage cancelable timers in timerfd

Peter is concerned about the extra scan of CLOCK_REALTIME_COS in the
timer interrupt. Yes, I did not think about it, because the solution
was so elegant. I didn't like the extra list in timerfd when it was
proposed some time ago, but with a rcu based list the list walk it's
less horrible than the original global lock, which was held over the
list iteration.

Requested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Peter Zijlstra <peterz@infradead.org>
13 years agoperf tools: Fix sample size bit operations
Frederic Weisbecker [Mon, 23 May 2011 11:06:27 +0000 (13:06 +0200)] 
perf tools: Fix sample size bit operations

What we want is to count the number of bits in the mask,
not some other random operation written in the middle
of the night.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1306148788-6179-2-git-send-email-fweisbec@gmail.com
[ Fixed perf_event__names[] alignment which was nearby and hurting my eyes ... ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoperf tools: Fix ommitted mmap data update on remap
Frederic Weisbecker [Mon, 23 May 2011 11:06:28 +0000 (13:06 +0200)] 
perf tools: Fix ommitted mmap data update on remap

Commit eac9eacee16 "perf tools: Check we are able to read the event
size on mmap" brought a check to ensure we can read the size of the
event before dereferencing it, and do a remap otherwise to move the
buffer forward.

However that remap was ommitting all the necessary work to
update the new page offset, head, and to unmap previous pages,
etc...

To fix this, gather all the code that fetches the event in a
seperate helper which does all the necessary checks about the
header/event size and tells us anytime a remap is needed.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1306148788-6179-3-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoapm-emulation: apm_mutex breaks ACK; remove it
Paul Parsons [Fri, 13 May 2011 01:46:03 +0000 (02:46 +0100)] 
apm-emulation: apm_mutex breaks ACK; remove it

apm_mutex is locked by a process (e.g. apm -s) at the start of apm_ioctl() and
remains locked while pm_suspend() is called. Any subsequent process trying to
ACK the suspend (e.g. apmd) is then blocked at the start of apm_ioctl(),
causing the suspend to be delayed for 5 seconds in apm_suspend_notifier()
while the ACK times out. In short, ACKs don't work.

The driver's data structures are sufficiently protected by assorted locks. And
pm_suspend() has its own mutex to prevent reentrancy. Consequently there is no
obvious requirement for apm_mutex, which evolved from earlier BKL calls. So
let's remove it.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agoMerge branches 'doc', 'multitouch', 'upstream' and 'upstream-fixes' into for-linus
Jiri Kosina [Mon, 23 May 2011 10:49:25 +0000 (12:49 +0200)] 
Merge branches 'doc', 'multitouch', 'upstream' and 'upstream-fixes' into for-linus

13 years agowatchdog: Change the default timeout and configure nmi watchdog period based on watch...
Mandeep Singh Baines [Mon, 23 May 2011 05:10:23 +0000 (22:10 -0700)] 
watchdog: Change the default timeout and configure nmi watchdog period based on watchdog_thresh

Before the conversion of the NMI watchdog to perf event, the
watchdog timeout was 5 seconds. Now it is 60 seconds. For my
particular application, netbooks, 5 seconds was a better
timeout. With a short timeout, we catch faults earlier and are
able to send back a panic. With a 60 second timeout, the user is
unlikely to wait and will instead hit the power button, causing
us to lose the panic info.

This change configures the NMI period to watchdog_thresh and
sets the softlockup_thresh to watchdog_thresh * 2. In addition,
watchdog_thresh was reduced to 10 seconds as suggested by Ingo
Molnar.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1306127423-3347-4-git-send-email-msb@chromium.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <20110517071642.GF22305@elte.hu>

13 years agowatchdog: Disable watchdog when thresh is zero
Mandeep Singh Baines [Mon, 23 May 2011 05:10:22 +0000 (22:10 -0700)] 
watchdog: Disable watchdog when thresh is zero

This restores the previous behavior of softlock_thresh.

Currently, setting watchdog_thresh to zero causes the watchdog
kthreads to consume a lot of CPU.

In addition, the logic of proc_dowatchdog_thresh and
proc_dowatchdog_enabled has been factored into proc_dowatchdog.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1306127423-3347-3-git-send-email-msb@chromium.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <20110517071018.GE22305@elte.hu>

13 years agowatchdog: Only disable/enable watchdog if neccessary
Mandeep Singh Baines [Mon, 23 May 2011 05:10:21 +0000 (22:10 -0700)] 
watchdog: Only disable/enable watchdog if neccessary

Don't take any action on an unsuccessful write to /proc.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1306127423-3347-2-git-send-email-msb@chromium.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agowatchdog: Fix rounding bug in get_sample_period()
Mandeep Singh Baines [Mon, 23 May 2011 05:10:20 +0000 (22:10 -0700)] 
watchdog: Fix rounding bug in get_sample_period()

In get_sample_period(), softlockup_thresh is integer divided by
5 before the multiplication by NSEC_PER_SEC. This results in
softlockup_thresh being rounded down to the nearest integer
multiple of 5.

For example, a softlockup_thresh of 4 rounds down to 0.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Cc: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1306127423-3347-1-git-send-email-msb@chromium.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agob43: fix comment typo reqest -> request
Jim Cromie [Sat, 21 May 2011 17:51:50 +0000 (11:51 -0600)] 
b43: fix comment typo reqest -> request

Recent trivial fix corrected 'occured', but left 'reqest'.
codespell needs another dictionary entry.

cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years agoHID: hid-multitouch: cosmetic changes, sort classes and devices
Benjamin Tissoires [Fri, 20 May 2011 13:59:34 +0000 (15:59 +0200)] 
HID: hid-multitouch: cosmetic changes, sort classes and devices

This patch sorts the defs for the MT_CLS. I choose to split
generic classes and device specific ones to be able to add
more generic classes in the future.

It also put eGalax devices at their right place (alphabetically)
in mt_devices.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
13 years ago[S390] cpu hotplug: fix external interrupt subclass mask handling
Heiko Carstens [Mon, 23 May 2011 08:24:50 +0000 (10:24 +0200)] 
[S390] cpu hotplug: fix external interrupt subclass mask handling

When disabling a cpu all external interrupt subclass masks in control
register 0 get cleared. However instead of the service signal subclass
mask bit an unused bit got cleared.
Accidently (or luckily) the service subclass mask gets cleared with the
pfault_fini() call that happens just before the rest of the subclass
mask bits get cleared.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
13 years ago[S390] oprofile: dont access lowcore
Heiko Carstens [Mon, 23 May 2011 08:24:49 +0000 (10:24 +0200)] 
[S390] oprofile: dont access lowcore

The external interrupt parameter is passed as function call parameter.
No need to access lowcore.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
13 years ago[S390] oprofile: add missing irq stats counter
Heiko Carstens [Mon, 23 May 2011 08:24:48 +0000 (10:24 +0200)] 
[S390] oprofile: add missing irq stats counter

Count CPU measurement external interrupts as well.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
13 years ago[S390] Ignore sendmmsg system call note wired up warning
Heiko Carstens [Mon, 23 May 2011 08:24:47 +0000 (10:24 +0200)] 
[S390] Ignore sendmmsg system call note wired up warning

sendmmsg is reachable via the socket system call. We don't enable a second
way on s390 to reach the same system call.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] s390,oprofile: fix compile error for !CONFIG_SMP
Jan Glauber [Mon, 23 May 2011 08:24:46 +0000 (10:24 +0200)] 
[S390] s390,oprofile: fix compile error for !CONFIG_SMP

Use ctl_set_bit instead of the smp_ctl_set_bit (likewise for clear bit)
to prevent the following build error for !CONFIG_SMP:

  CC      arch/s390/oprofile/hwsampler.o
arch/s390/oprofile/hwsampler.c: In function ‘hwsampler_deallocate’:
arch/s390/oprofile/hwsampler.c:1012: error: implicit declaration of function ‘smp_ctl_clear_bit’
arch/s390/oprofile/hwsampler.c: In function ‘hwsampler_start_all’:
arch/s390/oprofile/hwsampler.c:1201: error: implicit declaration of function ‘smp_ctl_set_bit’
  CC      kernel/seccomp.o
make[1]: *** [arch/s390/oprofile/hwsampler.o] Error 1
make: *** [arch/s390/oprofile] Error 2

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] s390,oprofile: fix alert counter increment
Jan Glauber [Mon, 23 May 2011 08:24:45 +0000 (10:24 +0200)] 
[S390] s390,oprofile: fix alert counter increment

The counter for requested interrupts should be incremented if the
program-request-alert bit is set and not the invalid-address-entry
bit.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] Remove unused includes in process.c
Jan Glauber [Mon, 23 May 2011 08:24:44 +0000 (10:24 +0200)] 
[S390] Remove unused includes in process.c

Remove unsused includes from arch/s390/kernel/process.c.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] get CPC image name
Martin Schwidefsky [Mon, 23 May 2011 08:24:43 +0000 (10:24 +0200)] 
[S390] get CPC image name

Provide sysfs attributes that contain the CPC name and the HMC network
name of the machine the operating system is running on. This information
is retrieved with the operation communication parameters (OCF) sclp
interface.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] sclp: event buffer dissection
Martin Schwidefsky [Mon, 23 May 2011 08:24:42 +0000 (10:24 +0200)] 
[S390] sclp: event buffer dissection

Move gds vector/subvector find functions to the sclp header file.
Simplify event buffer dissection in sclp tty code.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] chsc: process channel-path-availability information
Sebastian Ott [Mon, 23 May 2011 08:24:41 +0000 (10:24 +0200)] 
[S390] chsc: process channel-path-availability information

Update affected channel path descriptors when receiving channel path
availability information.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] refactor page table functions for better pgste support
Martin Schwidefsky [Mon, 23 May 2011 08:24:40 +0000 (10:24 +0200)] 
[S390] refactor page table functions for better pgste support

Rework the architecture page table functions to access the bits in the
page table extension array (pgste). There are a number of changes:
1) Fix missing pgste update if the attach_count for the mm is <= 1.
2) For every operation that affects the invalid bit in the pte or the
   rcp byte in the pgste the pcl lock needs to be acquired. The function
   pgste_get_lock gets the pcl lock and returns the current pgste value
   for a pte pointer. The function pgste_set_unlock stores the pgste
   and releases the lock. Between these two calls the bits in the pgste
   can be shuffled.
3) Define two software bits in the pte _PAGE_SWR and _PAGE_SWC to avoid
   calling SetPageDirty and SetPageReferenced from pgtable.h. If the
   host reference backup bit or the host change backup bit has been
   set the dirty/referenced state is transfered to the pte. The common
   code will pick up the state from the pte.
4) Add ptep_modify_prot_start and ptep_modify_prot_commit for mprotect.
5) Remove pgd_populate_kernel, pud_populate_kernel, pmd_populate_kernel
   pgd_clear_kernel, pud_clear_kernel, pmd_clear_kernel and ptep_invalidate.
6) Rename kvm_s390_test_and_clear_page_dirty to
   ptep_test_and_clear_user_dirty and add ptep_test_and_clear_user_young.
7) Define mm_exclusive() and mm_has_pgste() helper to improve readability.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] merge page_test_dirty and page_clear_dirty
Martin Schwidefsky [Mon, 23 May 2011 08:24:39 +0000 (10:24 +0200)] 
[S390] merge page_test_dirty and page_clear_dirty

The page_clear_dirty primitive always sets the default storage key
which resets the access control bits and the fetch protection bit.
That will surprise a KVM guest that sets non-zero access control
bits or the fetch protection bit. Merge page_test_dirty and
page_clear_dirty back to a single function and only clear the
dirty bit from the storage key.

In addition move the function page_test_and_clear_dirty and
page_test_and_clear_young to page.h where they belong. This
requires to change the parameter from a struct page * to a page
frame number.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] qdio: prevent compile warning
Jan Glauber [Mon, 23 May 2011 08:24:38 +0000 (10:24 +0200)] 
[S390] qdio: prevent compile warning

Prevent the following compile warning for !CONFIG_64BIT:

  CC      drivers/s390/cio/qdio_main.o
drivers/s390/cio/qdio_main.c: In function ‘handle_outbound’:
drivers/s390/cio/qdio_main.c:1449: warning: ‘state’ may be used uninitialized in this function

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] sclp: remove unnecessary sendmask check
Heiko Carstens [Mon, 23 May 2011 08:24:37 +0000 (10:24 +0200)] 
[S390] sclp: remove unnecessary sendmask check

The sendmask check is not needed. Remove it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] convert old cpumask API into new one
KOSAKI Motohiro [Mon, 23 May 2011 08:24:36 +0000 (10:24 +0200)] 
[S390] convert old cpumask API into new one

Adapt new API.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] pfault: cleanup code
Heiko Carstens [Mon, 23 May 2011 08:24:35 +0000 (10:24 +0200)] 
[S390] pfault: cleanup code

Small code cleanup.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] pfault: cpu hotplug vs missing completion interrupts
Heiko Carstens [Mon, 23 May 2011 08:24:34 +0000 (10:24 +0200)] 
[S390] pfault: cpu hotplug vs missing completion interrupts

On cpu hot remove a PFAULT CANCEL command is sent to the hypervisor
which in turn will cancel all outstanding pfault requests that have
been issued on that cpu (the same happens with a SIGP cpu reset).

The result is that we end up with uninterruptible processes where
the interrupt that would wake up these processes never arrives.

In order to solve this all processes which wait for a pfault
completion interrupt get woken up after a cpu hot remove. The worst
case that could happen is that they fault again and in turn need to
wait again.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] smp: add __noreturn attribute to cpu_die()
Heiko Carstens [Mon, 23 May 2011 08:24:33 +0000 (10:24 +0200)] 
[S390] smp: add __noreturn attribute to cpu_die()

Add missing __noreturn attribute to cpu_die():

arch/s390/kernel/smp.c:691:6: error: symbol 'cpu_die' redeclared with different type

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] percpu: implement arch specific irqsafe_cpu_ops
Heiko Carstens [Mon, 23 May 2011 08:24:32 +0000 (10:24 +0200)] 
[S390] percpu: implement arch specific irqsafe_cpu_ops

Implement arch specific irqsafe_cpu ops. The arch specific ops do not
disable/enable interrupts since that is an expensive operation. Instead
we disable preemption and perform a compare and swap loop.
Since on server distros (the ones we care about) preemption is disabled
the preempt_disable()/preempt_enable() pair is a nop.
In the end this code should be faster than the generic one.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] vdso: disable gcov profiling
Peter Oberparleiter [Mon, 23 May 2011 08:24:31 +0000 (10:24 +0200)] 
[S390] vdso: disable gcov profiling

The concepts of VDSO and gcov-based profiling don't mix: the former
includes kernel-provided code running in userspace, the latter adds
instructions that modify counters in kernel data segments. On s390
this has not been a problem so far due to VDSO code being written in
all-assembler which is exempt from gcov-based profiling. This could
change in the future, so disable profiling excplicitly for VDSO code.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] ap: skip device registration on type probe failure
Holger Dengler [Mon, 23 May 2011 08:24:30 +0000 (10:24 +0200)] 
[S390] ap: skip device registration on type probe failure

The registration of an ap device will be skipped, if the device type
probing fails.
Add names of current crypto adapters to the Kconfig help.

Signed-off-by: Holger Dengler <hd@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] extmem: get rid of compile warning
Heiko Carstens [Mon, 23 May 2011 08:24:29 +0000 (10:24 +0200)] 
[S390] extmem: get rid of compile warning

Get rid of these:

arch/s390/mm/extmem.c: In function 'segment_modify_shared':
arch/s390/mm/extmem.c:622:3: warning: 'end_addr' may be used uninitialized in this function [-Wuninitialized]
arch/s390/mm/extmem.c:627:18: warning: 'start_addr' may be used uninitialized in this function [-Wuninitialized]
arch/s390/mm/extmem.c: In function 'segment_load':
arch/s390/mm/extmem.c:481:11: warning: 'end_addr' may be used uninitialized in this function [-Wuninitialized]
arch/s390/mm/extmem.c:480:18: warning: 'start_addr' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] tape: remove unused/not handled return codes
Heiko Carstens [Mon, 23 May 2011 08:24:28 +0000 (10:24 +0200)] 
[S390] tape: remove unused/not handled return codes

Return codes are on purpose not handled or used. So remove them.

Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] monwriter: fix return code handling
Heiko Carstens [Mon, 23 May 2011 08:24:27 +0000 (10:24 +0200)] 
[S390] monwriter: fix return code handling

Fix return code handling within monwrite_new_hdr(). Return code handling
is everwhere implemented, the return code of the diagnose function was
just not passed.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] dasd: fix return code handling
Heiko Carstens [Mon, 23 May 2011 08:24:26 +0000 (10:24 +0200)] 
[S390] dasd: fix return code handling

Check return value of itcw_add_dcw() for error code and return it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] get rid of unused variables
Heiko Carstens [Mon, 23 May 2011 08:24:25 +0000 (10:24 +0200)] 
[S390] get rid of unused variables

Remove trivially unused variables as detected with -Wunused-but-set-variable.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] Remove tape block device driver.
Heiko Carstens [Mon, 23 May 2011 08:24:24 +0000 (10:24 +0200)] 
[S390] Remove tape block device driver.

Remove the tape block device driver. It's not of real use but has
already created some confusion when users wanted to access tape devices
and used the block device nodes instead of the character device nodes.

Also remove the whole tape documentation since it's completely outdated
and we have the device drivers book which is the place where everything
is properly documented.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] Remove data execution protection
Martin Schwidefsky [Mon, 23 May 2011 08:24:23 +0000 (10:24 +0200)] 
[S390] Remove data execution protection

The noexec support on s390 does not rely on a bit in the page table
entry but utilizes the secondary space mode to distinguish between
memory accesses for instructions vs. data. The noexec code relies
on the assumption that the cpu will always use the secondary space
page table for data accesses while it is running in the secondary
space mode. Up to the z9-109 class machines this has been the case.
Unfortunately this is not true anymore with z10 and later machines.
The load-relative-long instructions lrl, lgrl and lgfrl access the
memory operand using the same addressing-space mode that has been
used to fetch the instruction.
This breaks the noexec mode for all user space binaries compiled
with march=z10 or later. The only option is to remove the current
noexec support.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years ago[S390] cio: fix unreg race in set_online path
Sebastian Ott [Mon, 23 May 2011 08:23:32 +0000 (10:23 +0200)] 
[S390] cio: fix unreg race in set_online path

In ccw_device_set_online we basically start path verification and
wait for the device to reach a final state. If it turns out that the
device has no useable path we schedule the deregistration of the
device (which is still in an non-final state) and wake up the waiting
process. The deregistration process will set a final state, but if
the wake up happens to be prior to this, the device will hang forever
in ccw_device_set_online.

To fix this just set the final NOT_OPER state prior to the scheduled
deregistration of the device.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
13 years agosh: Ignore R_SH_NONE module relocations.
Paul Mundt [Mon, 23 May 2011 08:09:30 +0000 (17:09 +0900)] 
sh: Ignore R_SH_NONE module relocations.

Some modules may end up with R_SH_NONE relocs with the right combination
of compiler/kernel config (specifically dwarf unwinder), so simply trap
and ignore them instead of letting them get down to the error path.

Reported-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoSH: SE7751: Fix pcibios_map_platform_irq prototype.
Ralf Baechle [Fri, 13 May 2011 12:17:46 +0000 (12:17 +0000)] 
SH: SE7751: Fix pcibios_map_platform_irq prototype.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Mon, 23 May 2011 05:43:01 +0000 (22:43 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: use mark_buffer_dirty to mark btnode or meta data dirty
  nilfs2: always set back pointer to host inode in mapping->host
  nilfs2: get rid of NILFS_I_NILFS
  nilfs2: use list_first_entry
  nilfs2: use empty_aops for gc-inodes
  nilfs2: implement resize ioctl
  nilfs2: add truncation routine of segment usage file
  nilfs2: add routine to move secondary super block
  nilfs2: add ioctl which limits range of segment to be allocated
  nilfs2: zero fill unused portion of super root block
  nilfs2: super root size should change depending on inode size
  nilfs2: get rid of private page allocator
  nilfs2: merge list_del()/list_add_tail() to list_move_tail()

13 years agosh: remove warning and warning_symbol from struct stacktrace_ops
Richard Weinberger [Thu, 12 May 2011 13:11:11 +0000 (13:11 +0000)] 
sh: remove warning and warning_symbol from struct stacktrace_ops

Both warning and warning_symbol are nowhere used.
Let's get rid of them.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: wire up sys_sendmmsg.
Paul Mundt [Mon, 23 May 2011 05:41:32 +0000 (14:41 +0900)] 
sh: wire up sys_sendmmsg.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoclocksource: sh_tmu: Runtime PM support
Magnus Damm [Mon, 25 Apr 2011 13:40:26 +0000 (22:40 +0900)] 
clocksource: sh_tmu: Runtime PM support

Add Runtime PM support to the TMU driver.

The hardware device is enabled as long as the clocksource
or the clockevent portion of the driver is used.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoclocksource: sh_tmu: __clocksource_updatefreq_hz() update
Magnus Damm [Mon, 25 Apr 2011 13:38:37 +0000 (22:38 +0900)] 
clocksource: sh_tmu: __clocksource_updatefreq_hz() update

This patch updates the clocksource part of the TMU driver
to make use of the __clocksource_updatefreq_hz() function.

Without this patch the old code uses clocksource_register()
together with a hack that assumes a never changing clock rate
(see clk_enable(), clk_get_rate() and clk_disable()).

The patch uses clocksource_register_hz() with 1 Hz as initial
value, then lets the ->enable() callback update the value
with __clocksource_updatefreq_hz() once the struct clk has
been enabled and the frequency is stable.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoclocksource: sh_cmt: Runtime PM support
Magnus Damm [Mon, 25 Apr 2011 13:36:10 +0000 (22:36 +0900)] 
clocksource: sh_cmt: Runtime PM support

Add Runtime PM support to the CMT driver.

The hardware device is enabled as long as the clocksource
or the clockevent portion of the driver is used.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoclocksource: sh_cmt: __clocksource_updatefreq_hz() update
Magnus Damm [Mon, 25 Apr 2011 13:32:11 +0000 (22:32 +0900)] 
clocksource: sh_cmt: __clocksource_updatefreq_hz() update

This patch updates the clocksource part of the CMT driver
to make use of the __clocksource_updatefreq_hz() function.

Without this patch the old code uses clocksource_register()
together with a hack that assumes a never changing clock rate
(see clk_enable(), clk_get_rate() and clk_disable()).

The patch uses clocksource_register_hz() with 1 Hz as initial
value, then lets the ->enable() callback update the value
with __clocksource_updatefreq_hz() once the struct clk has
been enabled and the frequency is stable.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoUBIFS: switch to dynamic printks
Artem Bityutskiy [Tue, 17 May 2011 12:15:30 +0000 (15:15 +0300)] 
UBIFS: switch to dynamic printks

Switch to debugging using dynamic printk (pr_debug()). There is no good reason
to carry custom debugging prints if there is so cool and powerful generic
dynamic printk infrastructure, see Documentation/dynamic-debug-howto.txt. With
dynamic printks we can switch on/of individual prints, per-file, per-function
and per format messages. This means that instead of doing old-fashioned

echo 1 > /sys/module/ubifs/parameters/debug_msgs

to enable general messages, we can do:

echo 'format "UBIFS DBG gen" +ptlf' > control

to enable general messages and additionally ask the dynamic printk
infrastructure to print process ID, line number and function name. So there is
no reason to keep UBIFS-specific crud if there is more powerful generic thing.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Mon, 23 May 2011 05:08:32 +0000 (22:08 -0700)] 
Merge git://git./linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide/ide-scan-pci.c: Use for_each_pci_dev().
  ide: Use linux/mutex.h
  IDE: ide-floppy, remove unnecessary NULL check
  drivers/ide/pmac.c: Remove unnecessary casts of pci_get_drvdata
  ide: fix use after free in ide-acpi

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
Linus Torvalds [Mon, 23 May 2011 05:06:24 +0000 (22:06 -0700)] 
Merge git://git./linux/kernel/git/davem/sparc-next-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6: (28 commits)
  sparc32: fix build, fix missing cpu_relax declaration
  SCHED_TTWU_QUEUE is not longer needed since sparc32 now implements IPI
  sparc32,leon: Remove unnecessary page_address calls in LEON DMA API.
  sparc: convert old cpumask API into new one
  sparc32, sun4d: Implemented SMP IPIs support for SUN4D machines
  sparc32, sun4m: Implemented SMP IPIs support for SUN4M machines
  sparc32,leon: Implemented SMP IPIs for LEON CPU
  sparc32: implement SMP IPIs using the generic functions
  sparc32,leon: SMP power down implementation
  sparc32,leon: added some SMP comments
  sparc: add {read,write}*_be routines
  sparc32,leon: don't rely on bootloader to mask IRQs
  sparc32,leon: operate on boot-cpu IRQ controller registers
  sparc32: always define boot_cpu_id
  sparc32: removed unused code, implemented by generic code
  sparc32: avoid build warning at mm/percpu.c:1647
  sparc32: always register a PROM based early console
  sparc32: probe for cpu info only during startup
  sparc: consolidate show_cpuinfo in cpu.c
  sparc32,leon: implement genirq CPU affinity
  ...

13 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Mon, 23 May 2011 05:03:03 +0000 (22:03 -0700)] 
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: allow resync_start to be set while an array is active.
  md/raid10:  reformat some loops with less indenting.
  md/raid10: remove unused variable.
  md/raid10: make more use of 'slot' in raid10d.
  md/raid10: some tidying up in fix_read_error
  md/raid1: improve handling of pages allocated for write-behind.
  md/raid1: try fix_sync_read_error before process_checks.
  md/raid1: tidy up new functions: process_checks and fix_sync_read_error.
  md/raid1: split out two sub-functions from sync_request_write
  md: make error_handler functions more uniform and correct.
  md/multipath: discard ->working_disks in favour of ->degraded
  md/raid1: clean up read_balance.
  md: simplify raid10 read_balance
  md/bitmap: fix saving of events_cleared and other state.
  md: reject a re-add request that cannot be honoured.
  md: Fix race when creating a new md device.

13 years agowireless: fix fatal kernel-doc error + warning in mac80211.h
Randy Dunlap [Mon, 23 May 2011 00:22:45 +0000 (17:22 -0700)] 
wireless: fix fatal kernel-doc error + warning in mac80211.h

Fix new kernel-doc Error and Warning in <net/mac80211.h>:

  Error(linux-2.6.39-git5/include/net/mac80211.h:550): cannot understand prototype: 'struct ieee80211_sched_scan_ies '
  Warning(linux-2.6.39-git5/include/net/mac80211.h:2289): No description found for parameter 'sta'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agox86: setup_smep needs to be __cpuinit
Linus Torvalds [Mon, 23 May 2011 04:37:01 +0000 (21:37 -0700)] 
x86: setup_smep needs to be __cpuinit

The setup_smep function gets calle at resume time too, and is thus not a
pure __init function.  When marked as __init, it gets thrown out after
the kernel has initialized, and when the kernel is suspended and
resumed, the code will no longer be around, and we'll get a nice "kernel
tried to execute NX-protected page" oops because the page is no longer
marked executable.

Reported-and-tested-by: Parag Warudkar <parag.lkml@gmail.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoRemove prefetch() from <linux/skbuff.h> and "netlabel_addrlist.h"
Linus Torvalds [Sun, 22 May 2011 23:51:43 +0000 (16:51 -0700)] 
Remove prefetch() from <linux/skbuff.h> and "netlabel_addrlist.h"

Commit e66eed651fd1 ("list: remove prefetching from regular list
iterators") removed the include of prefetch.h from list.h.  The skbuff
list traversal still had them.

Quoth David Miller:
  "Please just remove the prefetches.

  Those are modelled after list.h as I intend to eventually convert
  SKB list handling to "struct list_head" but we're not there yet.

  Therefore if we kill prefetches from list.h we should kill it from
  these things in skbuff.h too."

Requested-by: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoAdd appropriate <linux/prefetch.h> include for prefetch users
Paul Gortmaker [Sun, 22 May 2011 20:47:17 +0000 (16:47 -0400)] 
Add appropriate <linux/prefetch.h> include for prefetch users

After discovering that wide use of prefetch on modern CPUs
could be a net loss instead of a win, net drivers which were
relying on the implicit inclusion of prefetch.h via the list
headers showed up in the resulting cleanup fallout.  Give
them an explicit include via the following $0.02 script.

 =========================================
 #!/bin/bash
 MANUAL=""
 for i in `git grep -l 'prefetch(.*)' .` ; do
  grep -q '<linux/prefetch.h>' $i
  if [ $? = 0 ] ; then
  continue
  fi

  ( echo '?^#include <linux/?a'
  echo '#include <linux/prefetch.h>'
  echo .
  echo w
  echo q
  ) | ed -s $i > /dev/null 2>&1
  if [ $? != 0 ]; then
  echo $i needs manual fixup
  MANUAL="$i $MANUAL"
  fi
 done
 echo ------------------- 8\<----------------------
 echo vi $MANUAL
 =========================================

Signed-off-by: Paul <paul.gortmaker@windriver.com>
[ Fixed up some incorrect #include placements, and added some
  non-network drivers and the fib_trie.c case    - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agosparc32: fix build, fix missing cpu_relax declaration
Sam Ravnborg [Sat, 21 May 2011 20:55:17 +0000 (22:55 +0200)] 
sparc32: fix build, fix missing cpu_relax declaration

Fix following sparc (32 bit) build error:

  CC      arch/sparc/kernel/asm-offsets.s
In file included from include/linux/seqlock.h:29:0,
                 from include/linux/time.h:8,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:57,
                 from arch/sparc/kernel/asm-offsets.c:13:
include/linux/spinlock.h: In function 'spin_unlock_wait':
include/linux/spinlock.h:360:2: error: implicit declaration of function 'cpu_relax'

Most likely caused by commit e66eed651fd1 ("list: remove
prefetching from regular list iterators") due to include
changes.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodmaengine: shdma: synchronize RCU before freeing, simplify spinlock
Guennadi Liakhovetski [Mon, 2 May 2011 07:59:02 +0000 (07:59 +0000)] 
dmaengine: shdma: synchronize RCU before freeing, simplify spinlock

List elements, deleted using list_del_rcu(), cannot be freed without
synchronising RCU. Further, the spinlock, used to protect the RCU
writer, is called in process context, so, we don't have to save flags.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agodmaengine: shdma: add runtime- and system-level power management
Guennadi Liakhovetski [Fri, 29 Apr 2011 17:09:25 +0000 (17:09 +0000)] 
dmaengine: shdma: add runtime- and system-level power management

This patch extends and fixes runtime power management in the shdma
driver to support powering down the DMA controller and adds support
for system-level suspend and resume.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agodmaengine: shdma: fix locking
Guennadi Liakhovetski [Fri, 29 Apr 2011 17:09:21 +0000 (17:09 +0000)] 
dmaengine: shdma: fix locking

Close multiple theoretical races, especially the one in
.device_free_chan_resources().

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: sh-sci: sh7377 and sh73a0 build fixes
Magnus Damm [Thu, 28 Apr 2011 03:10:35 +0000 (03:10 +0000)] 
sh: sh-sci: sh7377 and sh73a0 build fixes

Fix sh7377 and sh73a0 build failure:

drivers/tty/serial/sh-sci.c: In function 'scif_txfill':
drivers/tty/serial/sh-sci.c:338: error: implicit declaration of function 'sci_SCTFDR_in'
drivers/tty/serial/sh-sci.c: In function 'scif_rxfill':
drivers/tty/serial/sh-sci.c:351: error: implicit declaration of function 'sci_SCRFDR_in'
make[3]: *** [drivers/tty/serial/sh-sci.o] Error 1
make[2]: *** [drivers/tty/serial] Error 2
make[1]: *** [drivers/tty] Error 2
make: *** [drivers] Error 2

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosh: cosmetic improvement: use an existing pointer
Guennadi Liakhovetski [Fri, 15 Apr 2011 18:05:27 +0000 (18:05 +0000)] 
sh: cosmetic improvement: use an existing pointer

Use an existing local variable, instead of calculating the pointer
multiple times explicitly.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <damm@opensource.se>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoserial: sh-sci: suspend/resume wakeup support V2
Magnus Damm [Thu, 21 Apr 2011 13:08:46 +0000 (13:08 +0000)] 
serial: sh-sci: suspend/resume wakeup support V2

This patch adds wakeup support to the sh-sci driver. The serial
core deals with all details but defaults to wakeup disabled. So
to make use of this feature enable wakeup in sysfs:

echo enabled > /sys/class/tty/ttySC0/power/wakeup

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoserial: sh-sci: Runtime PM support
Magnus Damm [Tue, 19 Apr 2011 10:38:25 +0000 (10:38 +0000)] 
serial: sh-sci: Runtime PM support

Add support for Runtime PM in the sh-sci driver.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoMerge branch 'sh/genirq-threading' into sh-latest
Paul Mundt [Mon, 23 May 2011 02:36:14 +0000 (11:36 +0900)] 
Merge branch 'sh/genirq-threading' into sh-latest

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
Paul Mundt [Mon, 23 May 2011 02:35:33 +0000 (11:35 +0900)] 
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6 into sh-latest

13 years agobnx2x: allow device properly initialize after hotplug
Dmitry Kravkov [Sun, 22 May 2011 10:11:26 +0000 (10:11 +0000)] 
bnx2x: allow device properly initialize after hotplug

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>
13 years agobnx2x: fix DMAE timeout according to hw specifications
Dmitry Kravkov [Sun, 22 May 2011 10:09:19 +0000 (10:09 +0000)] 
bnx2x: fix DMAE timeout according to hw specifications

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>
13 years agobnx2x: properly handle CFC DEL in cnic flow
Vladislav Zolotarov [Sun, 22 May 2011 10:08:09 +0000 (10:08 +0000)] 
bnx2x: properly handle CFC DEL in cnic flow

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>
13 years agobnx2x: call dev_kfree_skb_any instead of dev_kfree_skb
Vladislav Zolotarov [Sun, 22 May 2011 10:06:58 +0000 (10:06 +0000)] 
bnx2x: call dev_kfree_skb_any instead of dev_kfree_skb

replace function calls when possible call in both irq/non-irq contexts

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>
13 years agonet: filter: move forward declarations to avoid compile warnings
Heiko Carstens [Sun, 22 May 2011 07:08:11 +0000 (07:08 +0000)] 
net: filter: move forward declarations to avoid compile warnings

Get rid of this compile warning:

In file included from arch/s390/kernel/compat_linux.c:37:0:
include/linux/filter.h:139:23: warning: 'struct sk_buff' declared inside parameter list

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopktgen: refactor pg_init() code
WANG Cong [Sun, 22 May 2011 00:52:08 +0000 (00:52 +0000)] 
pktgen: refactor pg_init() code

This also shrinks the object size a little.

   text    data     bss     dec     hex filename
  28834     186       8   29028    7164 net/core/pktgen.o
  28816     186       8   29010    7152 net/core/pktgen.o.AFTER

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: "David Miller" <davem@davemloft.net>,
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopktgen: use vzalloc_node() instead of vmalloc_node() + memset()
WANG Cong [Sun, 22 May 2011 00:17:11 +0000 (00:17 +0000)] 
pktgen: use vzalloc_node() instead of vmalloc_node() + memset()

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: skb_trim explicitely check the linearity instead of data_len
Emmanuel Grumbach [Sat, 21 May 2011 19:46:09 +0000 (19:46 +0000)] 
net: skb_trim explicitely check the linearity instead of data_len

The purpose of the check on data_len is to check linearity, so use the inline
helper for this. No overhead and more explicit.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Give backtrace in ip_rt_bug().
Dave Jones [Sat, 21 May 2011 07:16:42 +0000 (07:16 +0000)] 
ipv4: Give backtrace in ip_rt_bug().

Add a stack backtrace to the ip_rt_bug path for debugging

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: avoid synchronize_rcu() in dev_deactivate_many
Eric Dumazet [Thu, 19 May 2011 23:42:09 +0000 (23:42 +0000)] 
net: avoid synchronize_rcu() in dev_deactivate_many

dev_deactivate_many() issues one synchronize_rcu() call after qdiscs set
to noop_qdisc.

This call is here to make sure they are no outstanding qdisc-less
dev_queue_xmit calls before returning to caller.

But in dismantle phase, we dont have to wait, because we wont activate
again the device, and we are going to wait one rcu grace period later in
rollback_registered_many().

After this patch, device dismantle uses one synchronize_net() and one
rcu_barrier() call only, so we have a ~30% speedup and a smaller RTNL
latency.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Patrick McHardy <kaber@trash.net>,
CC: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: remove synchronize_net() from netdev_set_master()
Eric Dumazet [Thu, 19 May 2011 19:37:40 +0000 (19:37 +0000)] 
net: remove synchronize_net() from netdev_set_master()

In the old days, we used to access dev->master in __netif_receive_skb()
in a rcu_read_lock section.

So one synchronize_net() call was needed in netdev_set_master() to make
sure another cpu could not use old master while/after we release it.

We now use netdev_rx_handler infrastructure and added one
synchronize_net() call in bond_release()/bond_release_all()

Remove the obsolete synchronize_net() from netdev_set_master() and add
one in bridge del_nbp() after its netdev_rx_handler_unregister() call.

This makes enslave -d a bit faster.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jiri Pirko <jpirko@redhat.com>
CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agortnetlink: ignore NETDEV_RELEASE and NETDEV_JOIN event
Amerigo Wang [Thu, 19 May 2011 23:06:32 +0000 (23:06 +0000)] 
rtnetlink: ignore NETDEV_RELEASE and NETDEV_JOIN event

These two events are not expected to be caught by userspace.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: rename NETDEV_BONDING_DESLAVE to NETDEV_RELEASE
Amerigo Wang [Thu, 19 May 2011 21:39:12 +0000 (21:39 +0000)] 
net: rename NETDEV_BONDING_DESLAVE to NETDEV_RELEASE

s/NETDEV_BONDING_DESLAVE/NETDEV_RELEASE/ as Andy suggested.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Cc: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: call NETDEV_JOIN notifiers when add a slave
Amerigo Wang [Thu, 19 May 2011 21:39:11 +0000 (21:39 +0000)] 
bridge: call NETDEV_JOIN notifiers when add a slave

In the previous patch I added NETDEV_JOIN, now
we can notify netconsole when adding a device to a bridge too.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetpoll: disable netpoll when enslave a device
Amerigo Wang [Thu, 19 May 2011 21:39:10 +0000 (21:39 +0000)] 
netpoll: disable netpoll when enslave a device

V3: rename NETDEV_ENSLAVE to NETDEV_JOIN

Currently we do nothing when we enslave a net device which is running netconsole.
Neil pointed out that we may get weird results in such case, so let's disable
netpoll on the device being enslaved. I think it is too harsh to prevent
the device being ensalved if it is running netconsole.

By the way, this patch also removes the NETDEV_GOING_DOWN from netconsole
netdev notifier, because netpoll will check if the device is running or not
and we don't handle NETDEV_PRE_UP neither.

This patch is based on net-next-2.6.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomacvlan: Forward unicast frames in bridge mode to lowerdev
David Ward [Thu, 19 May 2011 02:53:20 +0000 (02:53 +0000)] 
macvlan: Forward unicast frames in bridge mode to lowerdev

Unicast frames between macvlan interfaces in bridge mode are not otherwise
sent to network taps on the lowerdev (as all other macvlan frames are), so
forward the frames to the receive queue of the lowerdev first.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Remove linux/prefetch.h include from linux/skbuff.h
David S. Miller [Mon, 23 May 2011 00:54:11 +0000 (20:54 -0400)] 
net: Remove linux/prefetch.h include from linux/skbuff.h

No longer needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Include linux/prefetch.h in fib_trie.c
David S. Miller [Mon, 23 May 2011 00:53:43 +0000 (20:53 -0400)] 
ipv4: Include linux/prefetch.h in fib_trie.c

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetlabel: Remove prefetches from list handlers.
David S. Miller [Mon, 23 May 2011 00:42:10 +0000 (20:42 -0400)] 
netlabel: Remove prefetches from list handlers.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers/net: add prefetch header for prefetch users
Paul Gortmaker [Sun, 22 May 2011 11:02:08 +0000 (11:02 +0000)] 
drivers/net: add prefetch header for prefetch users

After discovering that wide use of prefetch on modern CPUs
could be a net loss instead of a win, net drivers which were
relying on the implicit inclusion of prefetch.h via the list
headers showed up in the resulting cleanup fallout.  Give
them an explicit include via the following $0.02 script.

 =========================================
 #!/bin/bash
 MANUAL=""
 for i in `git grep -l 'prefetch(.*)' .` ; do
  grep -q '<linux/prefetch.h>' $i
  if [ $? = 0 ] ; then
  continue
  fi

  ( echo '?^#include <linux/?a'
  echo '#include <linux/prefetch.h>'
  echo .
  echo w
  echo q
  ) | ed -s $i > /dev/null 2>&1
  if [ $? != 0 ]; then
  echo $i needs manual fixup
  MANUAL="$i $MANUAL"
  fi
 done
 echo ------------------- 8\<----------------------
 echo vi $MANUAL
 =========================================

Signed-off-by: Paul <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agorionet: Remove pointless printk of skb pointer.
David S. Miller [Mon, 23 May 2011 00:35:54 +0000 (20:35 -0400)] 
rionet: Remove pointless printk of skb pointer.

Casting to u32 warns anyways.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Remove prefetches from SKB list handlers.
David S. Miller [Mon, 23 May 2011 00:35:29 +0000 (20:35 -0400)] 
net: Remove prefetches from SKB list handlers.

Noticed by Linus.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocaif: Plug memory leak for checksum error
sjur.brandeland@stericsson.com [Sun, 22 May 2011 11:18:54 +0000 (11:18 +0000)] 
caif: Plug memory leak for checksum error

In case of checksum error, the framing layer returns -EILSEQ, but
does not free the packet. Plug this hole by freeing the packet if
-EILSEQ is returned.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocaif: Update documentation of CAIF transmit and receive functions.
sjur.brandeland@stericsson.com [Sun, 22 May 2011 11:18:53 +0000 (11:18 +0000)] 
caif: Update documentation of CAIF transmit and receive functions.

Trivial patch updating documentation in header files only.
Error handling of CAIF transmit errors was changed by commit:
      caif: Don't resend if dev_queue_xmit fails.
This patch updates the documentation accordingly.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocaif: Fix freezes when running CAIF loopback device
sjur.brandeland@stericsson.com [Sun, 22 May 2011 11:18:52 +0000 (11:18 +0000)] 
caif: Fix freezes when running CAIF loopback device

Fix spinlock bugs when running out of link-ids in loopback tests and
avoid allocating link-id when error is set in link-setup-response.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocaif: Fixes freeze on Link layer removal.
sjur.brandeland@stericsson.com [Sun, 22 May 2011 11:18:51 +0000 (11:18 +0000)] 
caif: Fixes freeze on Link layer removal.

CAIF Socket layer - caif_socket.c:
- Plug mem-leak at reconnect.
- Always call disconnect to cleanup CAIF stack.
- Disconnect will always report success.

CAIF configuration layer - cfcnfg.c
- Disconnect must dismantle the caif stack correctly
- Protect against faulty removals (check on id zero)

CAIF mux layer - cfmuxl.c
- When inserting new service layer in the MUX remove
  any old entries with the same ID.
- When removing CAIF Link layer, remove the associated
  service layers before notifying service layers.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocaif: Bugfix add check NULL pointer before calling functions.
sjur.brandeland@stericsson.com [Sun, 22 May 2011 11:18:50 +0000 (11:18 +0000)] 
caif: Bugfix add check NULL pointer before calling functions.

Add check on layer->dn != NULL before calling functions in
layer below.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoGive up on pushing CC_OPTIMIZE_FOR_SIZE
Linus Torvalds [Sun, 22 May 2011 21:30:36 +0000 (14:30 -0700)] 
Give up on pushing CC_OPTIMIZE_FOR_SIZE

I still happen to believe that I$ miss costs are a major thing, but
sadly, -Os doesn't seem to be the solution.  With or without it, gcc
will miss some obvious code size improvements, and with it enabled gcc
will sometimes make choices that aren't good even with high I$ miss
ratios.

For example, with -Os, gcc on x86 will turn a 20-byte constant memcpy
into a "rep movsl".  While I sincerely hope that x86 CPU's will some day
do a good job at that, they certainly don't do it yet, and the cost is
higher than a L1 I$ miss would be.

Some day I hope we can re-enable this.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'viafb-next' of git://github.com/schandinat/linux-2.6
Linus Torvalds [Sun, 22 May 2011 19:39:58 +0000 (12:39 -0700)] 
Merge branch 'viafb-next' of git://github.com/schandinat/linux-2.6

* 'viafb-next' of git://github.com/schandinat/linux-2.6: (24 commits)
  viafb: Automatic OLPC XO-1.5 configuration
  viafb: remove unused CEA mode
  viafb: try to map less memory in case of failure
  viafb: use write combining for video ram
  viafb: add X server compatibility mode
  viafb: reduce OLPC refresh a bit
  viafb: fix OLPC XO 1.5 device connection
  viafb: fix OLPC DCON refresh rate
  viafb: delete clock and PLL initialization
  viafb: replace custom return values
  viafb: some small cleanup for global variables
  viafb: gather common good, old VGA initialization in one place
  viafb: add engine clock support
  viafb: add VIA slapping capability
  viafb: split clock and PLL code to an extra file
  viafb: add primary/secondary clock on/off switches
  viafb: add clock source selection and PLL power management support
  viafb: prepare for PLL separation
  viafb: call viafb_get_clk_value only in viafb_set_vclock
  viafb: remove unused max_hres/vres
  ...

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6
Linus Torvalds [Sun, 22 May 2011 19:38:40 +0000 (12:38 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jejb/parisc-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
  [PARISC] wire up syncfs syscall
  [PARISC] wire up the fhandle syscalls
  [PARISC] wire up clock_adjtime syscall
  [PARISC] wire up fanotify syscalls
  [PARISC] prevent speculative re-read on cache flush
  [PARISC] only make executable areas executable
  [PARISC] fix pacache .size with new binutils

13 years agofs: add missing prefetch.h include
Heiko Carstens [Sun, 22 May 2011 16:54:21 +0000 (18:54 +0200)] 
fs: add missing prefetch.h include

Fixes this build error on s390 and probably other archs as well:

  fs/inode.c: In function 'new_inode':
  fs/inode.c:894:2: error: implicit declaration of function 'spin_lock_prefetch'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
[ Happens on architectures that don't define their own prefetch
  functions in <asm/processor.h>, and instead rely on the default
  ones in <linux/prefetch.h>   - Linus]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This page took 0.109501 seconds and 5 git commands to generate.