Sam Ravnborg [Sat, 12 May 2012 01:43:48 +0000 (01:43 +0000)]
sparc32: drop extra getprop call during boot
It was present only to support the sun4, sun4c boxes which
do not have the "compatible" property in the root-node
of the device tree.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 12 May 2012 01:43:47 +0000 (01:43 +0000)]
sparc32: drop prom version check in head_32.S
We already sorted out if we are a sun4/sun4c and halted.
So no need to check the prom version as we know this is
a v2 or v3 as sun4m, sun4d etc. does not use a v1 prom.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 12 May 2012 01:43:46 +0000 (01:43 +0000)]
sparc32: remove sun4c specific variables from head_32.S
This gives us back 7 pages...
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 08:02:11 +0000 (01:02 -0700)]
sparc32: Add back early sun4/sun4c detection so we can warn properly.
We need to do the check before we try to remap the kernel using
SRMMU operations.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 07:35:45 +0000 (00:35 -0700)]
sparc32: Trivial removal of sun4c references in comments.
I left some around, like the ones in the openprom headers, since
we need to think about which pieces of those datastructures and
code we can completely toss now.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 07:23:23 +0000 (00:23 -0700)]
sparc32: Remove sun4 and sun4c from enum sparc_cpu.
All the remaining references are trivially removed since we've
just eliminated the final reference to sparc_cpu_model from
assembler code in commit
b7d96ce189564e661909fbf8df39d7358149885b
("sparc32: Remove sparc_cpu_model read from floppy interrupt handler.")
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 07:13:32 +0000 (00:13 -0700)]
sparc32: Remove sparc_cpu_model read from floppy interrupt handler.
Since we no longer test the cpu model value, no need to load
it into a register any more.
It just gets overwritten in the next instruction anyways. :-)
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:43:11 +0000 (21:43 -0700)]
sparc32: Kill unused defines from asm/head_32.h
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:39:48 +0000 (21:39 -0700)]
sparc32: Remove some more sun4c code from floppy glue.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:35:36 +0000 (21:35 -0700)]
sparc32: Remove sun4c tlb/vac insn patching from entry.S
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:31:49 +0000 (21:31 -0700)]
sparc32: Remove ldXa and stXa defines, unused.
These were for sharing some MMU code between sun4 and sun4c.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:29:17 +0000 (21:29 -0700)]
sparc32: Remove sun4{,c} control reg definitions from contregs.h.
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:27:04 +0000 (21:27 -0700)]
sparc32: Remove sparc_lvl15_nmi().
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:23:05 +0000 (21:23 -0700)]
sparc32: Restore SMP build and rectify sun4m NMI when non-SMP.
The non-SMP sun4m NMI handler was still accessing SUN4C registers.
Fix that and share the sun4m NMI trap code between SMP and non-SMP
cases.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:07:50 +0000 (21:07 -0700)]
sparc32: Kill asm/vac-ops.h
All sun4/sun4c stuff and unused.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 04:01:47 +0000 (21:01 -0700)]
sparc32: Stop warning about sun4/sun4c in SMP Kconfig option.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 03:59:57 +0000 (20:59 -0700)]
sparc32: Remove sun4c floppy assembler.
There were two blocks of code for the two ways to twiddle
the terminal count pin in the AUXIO register, one for
sun4c and one for sun4m. Kill the former.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 03:57:29 +0000 (20:57 -0700)]
sparc32: Put back SPARC_BRANCH.
It's needed for the floppy interrupt trap table patching.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 03:51:51 +0000 (20:51 -0700)]
sparc32: Kill SUN4C_LOCK_{VADDR,END} and associated comment.
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 03:45:18 +0000 (20:45 -0700)]
sparc: Clear out unused asm/machines.h values.
Remove sun4 and sun4c machine ID values from asm/machines.h
Also kill NUM_SUN_MACHINES, use ARRAY_SIZE instead.
Kill asm/machines.h include and sun4c checks from asm/floppy_32.h
Remove asm/machines.h include from setup_32.c and time_32.c, unused.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 03:33:22 +0000 (20:33 -0700)]
sparc: Convert some assembler over to linakge.h's ENTRY/ENDPROC
Use those, instead of doing it all by hand.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 12 May 2012 02:53:29 +0000 (19:53 -0700)]
sparc32: Remove inline strncmp "optimization" for constant counts.
Let the compiler do stuff like this.
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:17 +0000 (11:35 +0000)]
sparc32: use inline versions of pgprot_noncached, pte_to_pgoff and pgoff_to_pte
We no longer have different versions of these so use a few simple
static inline functions.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:16 +0000 (11:35 +0000)]
sparc32: drop btfixup for alloc_thread_info_node/free_thread_info
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:15 +0000 (11:35 +0000)]
sparc32: drop sun4c bits from head_32.S
As we no longer support sun4c we can remove all the code to
support remapping the kernel in head_32.S.
We also try to tell the user that the machine is not support,
in case someone try to boot the kernel on a sun4c one day
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:14 +0000 (11:35 +0000)]
sparc32: drop test for sun4c in signal_32
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:13 +0000 (11:35 +0000)]
sparc32: drop sun4c user stack checking routine
With this we no longer do any run-time patchings of traps.
So drop the function + macro to support this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:12 +0000 (11:35 +0000)]
sparc32: drop sun4c stack checking routine
And drop run-time patching too.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:11 +0000 (11:35 +0000)]
sparc32: drop sun4c window overflow stack checking routine
Also drop run-time patching for srmmu
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:10 +0000 (11:35 +0000)]
sparc32: drop sun4c specific stack validation
This allows us to kill run-time patching for this function too
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Thu, 10 May 2012 21:12:10 +0000 (23:12 +0200)]
sparc32: delete pgtsun4c.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:08 +0000 (11:35 +0000)]
sparc32: remove all uses of ARCH_SUN4C
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:07 +0000 (11:35 +0000)]
sparc32: drop sun4c specific ___xchg32 implementation
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:06 +0000 (11:35 +0000)]
sparc32: remove sun4c traps
We used to runtime patch the trap table for srmmu.
With the removal of sun4c support this is no longer required.
With the sun4c trap removed we can remove all the referenced
trap handling which is sun4c specific.
This also allows us to get rid of the nosun4c.c file that
contained only dummy functions/data.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:05 +0000 (11:35 +0000)]
sparc32: remove calls to sun4c dummy mm inits functions
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 11 May 2012 11:35:04 +0000 (11:35 +0000)]
sparc32: drop sun4c support
Machines with sun4c support are very rare these days, and noone
is using them for any practical purposes.
The sun4c support has been know broken for quite some time too.
So rather than trying to keep it up-to-date, lets get rid of it.
This allows us to do some very welcome cleanup of sparc32 support.
Updated the former sun4c specifc nmi (which was also used
for sun4m UP) to be a generic UP NMI.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paul Gortmaker [Thu, 10 May 2012 00:44:29 +0000 (20:44 -0400)]
sparc: fix build fail in mm/init_64.c when NEED_MULTIPLE_NODES is off
Commit
625d693e9784f988371e69c2b41a2172c0be6c11 (linux-next)
"sparc64: Convert over to NO_BOOTMEM."
causes the following compile failure for sparc64 allnoconfig:
arch/sparc/mm/init_64.c:822:16: error: unused variable 'paddr'
arch/sparc/mm/init_64.c:1759:7: error: unused variable 'node'
arch/sparc/mm/init_64.c:809:12: error: 'memblock_nid_range' defined but not used
The paddr decl can easily be shuffled within the ifdef. The
memblock_nid_range is just a stub function for when NEED_MULTIPLE_NODES
is off, but the only caller is within a NEED_MULTIPLE_NODES enabled
section, so we can simply delete it.
The unused "node" is slightly more interesting. In the case of
"# CONFIG_NEED_MULTIPLE_NODES is not set" we no longer get the
definition of:
#define NODE_DATA(nid) (node_data[nid])
from arch/sparc/include/asm/mmzone.h - but instead we get:
#define NODE_DATA(nid) (&contig_page_data)
from include/linux/mmzone.h -- and since the arg is ignored,
the thing really is unused. Rather than put in a confusing
looking __maybe_unused, simply splitting the declaration
from the assignment seemed to me to be the least offensive.
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 27 Apr 2012 17:55:08 +0000 (10:55 -0700)]
sparc64: Do not set max_mapnr.
There is no need, since nothing relevant to sparc64 makes
use of this value.
Noticed by Sam Ravnborg.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 27 Apr 2012 03:50:34 +0000 (20:50 -0700)]
sparc64: Use node local allocations for IRQ stacks.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 25 Apr 2012 20:13:43 +0000 (13:13 -0700)]
sparc64: Convert over to NO_BOOTMEM.
With help from Sam Ravnborg.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 27 Apr 2012 03:00:35 +0000 (20:00 -0700)]
Merge git://git./linux/kernel/git/torvalds/linux
Conflicts:
arch/sparc/kernel/leon_smp.c
Merge mainline to get the nobootmem.c bug fix, for the sake
of the sparc64 NO_BOOTMEM conversion.
Resolve a small include line conflict in leon_smp.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Thu, 26 Apr 2012 22:36:27 +0000 (15:36 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile fixes from Chris Metcalf:
"One change fixes a platform-independent bug about environment var
handling in the boot command line. The other is a trivial
tile-specific bug fix to avoid a link-time warning."
* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/tile: fix a couple of functions that should be __init
init: fix bug where environment vars can't be passed via boot args
Linus Torvalds [Thu, 26 Apr 2012 22:35:35 +0000 (15:35 -0700)]
Merge tag 'ib-fixes' of git://git./linux/kernel/git/roland/infiniband
Pull infiniband fixes from Roland Dreier:
"A few fixes for regressions introduced in 3.4-rc1:
- fix memory leak in mlx4
- fix two problems with new MAD response generation code"
* tag 'ib-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB/mlx4: Fix memory leaks in ib_link_query_port()
IB/mad: Don't send response for failed MADs
IB/mad: Set 'D' bit in response for unhandled MADs
Linus Torvalds [Thu, 26 Apr 2012 22:33:36 +0000 (15:33 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul.
* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine/amba-pl08x : reset phychan_hold on terminate all
dma: pl330: fix a couple of compilation warnings
dma/ste_dma40: fix erroneous comparison
dma/ste_dma40: explicitly include regulator consumer header
dma40: Improve the logic of stopping logical chan
dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
dma: mxs-dma: enable channel in device_issue_pending call
dmaengine: imx-dma: dont complete descriptor for cyclic dma
Linus Torvalds [Thu, 26 Apr 2012 22:32:39 +0000 (15:32 -0700)]
Merge tag 'sound-3.4' of git://git./linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"A workaround for an ASUS laptop and a few ASoC changes; most of the
commits are tagged for stable, too."
* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: wm8994: Improve sequencing of AIF channel enables
ALSA: HDA: Add external mic quirk for Asus Zenbook UX31E
ASoC: fsi: update for dmaengine prep_slave_sg fallout.
ASoC: core: Fix card RTD count for deferred probe.
ASoC: cs42l73: don't use negative array index
ASoC: dapm: Ensure power gets managed for line widgets
Linus Torvalds [Thu, 26 Apr 2012 22:31:53 +0000 (15:31 -0700)]
Merge git://www.linux-watchdog.org/linux-watchdog
Pull a watchdog fix from Wim Van Sebroeck:
"It will fix the size when reading or writing to WD Timer port 0x72 in
the hpwdt driver."
* git://www.linux-watchdog.org/linux-watchdog:
hpwdt: Only BYTE reads/writes to WD Timer port 0x72
Linus Torvalds [Thu, 26 Apr 2012 22:30:26 +0000 (15:30 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner.
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tick: Fix the spurious broadcast timer ticks after resume
tick: Ensure that the broadcast device is initialized
tick: Fix oneshot broadcast setup really
Linus Torvalds [Thu, 26 Apr 2012 22:24:45 +0000 (15:24 -0700)]
Merge branch 'akpm' (Andrew's patch-bomb)
Merge fixes from Andrew Morton:
"13 fixes. The acerhdf patches aren't (really) fixes. But they've
been stuck in my tree for up to two years, sent to Matthew multiple
times and the developers are unhappy."
* emailed from Andrew Morton <akpm@linux-foundation.org>: (13 patches)
mm: fix NULL ptr dereference in move_pages
mm: fix NULL ptr dereference in migrate_pages
revert "proc: clear_refs: do not clear reserved pages"
drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled
arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file
hugetlbfs: lockdep annotate root inode properly
acerhdf: lowered default temp fanon/fanoff values
acerhdf: add support for new hardware
acerhdf: add support for Aspire 1410 BIOS v1.3314
fs/buffer.c: remove BUG() in possible but rare condition
mm: fix up the vmscan stat in vmstat
epoll: clear the tfile_check_list on -ELOOP
mm/hugetlb: fix warning in alloc_huge_page/dequeue_huge_page_vma
Mingarelli, Thomas [Tue, 3 Apr 2012 05:37:01 +0000 (05:37 +0000)]
hpwdt: Only BYTE reads/writes to WD Timer port 0x72
This patch is to correct the use of the iLO port 0x72 usage.
The port 0x72 is a byte size write/read and hpwdt is currently
writing a WORD.
Signed-off by: Thomas Mingarelli <thomas.mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Linus Torvalds [Thu, 26 Apr 2012 04:38:44 +0000 (21:38 -0700)]
Merge tag 'nfs-for-3.4-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client bugfixes from Trond Myklebust:
- Fix NFSv4 infinite loops on open(O_TRUNC)
- Fix an Oops and an infinite loop in the NFSv4 flock code
- Don't register the PipeFS filesystem until it has been set up
- Fix an Oops in nfs_try_to_update_request
- Don't reuse NFSv4 open owners: fixes a bad sequence id storm.
* tag 'nfs-for-3.4-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFSv4: Keep dropped state owners on the LRU list for a while
NFSv4: Ensure that we don't drop a state owner more than once
NFSv4: Ensure we do not reuse open owner names
nfs: Enclose hostname in brackets when needed in nfs_do_root_mount
NFS: put open context on error in nfs_flush_multi
NFS: put open context on error in nfs_pagein_multi
NFSv4: Fix open(O_TRUNC) and ftruncate() error handling
NFSv4: Ensure that we check lock exclusive/shared type against open modes
NFSv4: Ensure that the LOCK code sets exception->inode
NFS: check for req==NULL in nfs_try_to_update_request cleanup
SUNRPC: register PipeFS file system after pernet sybsystem
Linus Torvalds [Thu, 26 Apr 2012 04:29:26 +0000 (21:29 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
Pull x86 fixes from H. Peter Anvin.
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x32, siginfo: Provide proper overrides for x32 siginfo_t
asm-generic: Allow overriding clock_t and add attributes to siginfo_t
x32: Check __ILP32__ instead of __LP64__ for x32
x86, acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler
ACPI: Convert wake_sleep_flags to a value instead of function
x86, apic: APIC code touches invalid MSR on P5 class machines
i387: ptrace breaks the lazy-fpu-restore logic
x86/platform: Remove incorrect error message in x86_default_fixup_cpu_id()
x86, efi: Add dedicated EFI stub entry point
x86/amd: Remove broken links from comment and kernel message
x86, microcode: Ensure that module is only loaded on supported AMD CPUs
x86, microcode: Fix sysfs warning during module unload on unsupported CPUs
Linus Torvalds [Thu, 26 Apr 2012 04:28:10 +0000 (21:28 -0700)]
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Pull x86 platform driver fixes from Matthew Garrett:
"One annoyance fix (make intel_ips stop complaining unnecessarily) and
one oops fix (unterminated list in dell-laptop). Both have been in
-next for a while with no complaints."
* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
dell-laptop: Terminate quirks list properly
intel_ips: Hush the i915 symbols message
Sasha Levin [Wed, 25 Apr 2012 23:01:53 +0000 (16:01 -0700)]
mm: fix NULL ptr dereference in move_pages
Commit
3268c63 ("mm: fix move/migrate_pages() race on task struct") has
added an odd construct where 'mm' is checked for being NULL, and if it is,
it would get dereferenced anyways by mput()ing it.
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hugh Dickins <hughd@google.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sasha Levin [Wed, 25 Apr 2012 23:01:52 +0000 (16:01 -0700)]
mm: fix NULL ptr dereference in migrate_pages
Commit
3268c63 ("mm: fix move/migrate_pages() race on task struct") has
added an odd construct where 'mm' is checked for being NULL, and if it is,
it would get dereferenced anyways by mput()ing it.
This would lead to the following NULL ptr deref and BUG() when calling
migrate_pages() with a pid that has no mm struct:
[25904.193704] BUG: unable to handle kernel NULL pointer dereference at
0000000000000050
[25904.194235] IP: [<
ffffffff810b0de7>] mmput+0x27/0xf0
[25904.194235] PGD
773e6067 PUD
77da0067 PMD 0
[25904.194235] Oops: 0002 [#1] PREEMPT SMP
[25904.194235] CPU 2
[25904.194235] Pid: 31608, comm: trinity Tainted: G W 3.4.0-rc2-next-
20120412-sasha #69
[25904.194235] RIP: 0010:[<
ffffffff810b0de7>] [<
ffffffff810b0de7>] mmput+0x27/0xf0
[25904.194235] RSP: 0018:
ffff880077d49e08 EFLAGS:
00010202
[25904.194235] RAX:
0000000000000286 RBX:
0000000000000000 RCX:
0000000000000000
[25904.194235] RDX:
ffff880075ef8000 RSI:
000000000000023d RDI:
0000000000000286
[25904.194235] RBP:
ffff880077d49e18 R08:
0000000000000001 R09:
0000000000000001
[25904.194235] R10:
0000000000000000 R11:
0000000000000000 R12:
0000000000000000
[25904.194235] R13:
00000000ffffffea R14:
ffff880034287740 R15:
ffff8800218d3010
[25904.194235] FS:
00007fc8b244c700(0000) GS:
ffff880029800000(0000) knlGS:
0000000000000000
[25904.194235] CS: 0010 DS: 0000 ES: 0000 CR0:
0000000080050033
[25904.194235] CR2:
0000000000000050 CR3:
00000000767c6000 CR4:
00000000000406e0
[25904.194235] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[25904.194235] DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
[25904.194235] Process trinity (pid: 31608, threadinfo
ffff880077d48000, task
ffff880075ef8000)
[25904.194235] Stack:
[25904.194235]
ffff8800342876c0 0000000000000000 ffff880077d49f78 ffffffff811b8020
[25904.194235]
ffffffff811b7d91 ffff880075ef8000 ffff88002256d200 0000000000000000
[25904.194235]
00000000000003ff 0000000000000000 0000000000000000 0000000000000000
[25904.194235] Call Trace:
[25904.194235] [<
ffffffff811b8020>] sys_migrate_pages+0x340/0x3a0
[25904.194235] [<
ffffffff811b7d91>] ? sys_migrate_pages+0xb1/0x3a0
[25904.194235] [<
ffffffff8266cbb9>] system_call_fastpath+0x16/0x1b
[25904.194235] Code: c9 c3 66 90 55 31 d2 48 89 e5 be 3d 02 00 00 48 83 ec 10 48 89 1c 24 4c 89 64 24 08 48 89 fb 48 c7 c7 cf 0e e1 82 e8 69 18 03 00 <f0> ff 4b 50 0f 94 c0 84 c0 0f 84 aa 00 00 00 48 89 df e8 72 f1
[25904.194235] RIP [<
ffffffff810b0de7>] mmput+0x27/0xf0
[25904.194235] RSP <
ffff880077d49e08>
[25904.194235] CR2:
0000000000000050
[25904.348999] ---[ end trace
a307b3ed40206b4b ]---
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Will Deacon [Wed, 25 Apr 2012 23:01:52 +0000 (16:01 -0700)]
revert "proc: clear_refs: do not clear reserved pages"
Revert commit
85e72aa5384 ("proc: clear_refs: do not clear reserved
pages"), which was a quick fix suitable for -stable until ARM had been
moved over to the gate_vma mechanism:
https://lkml.org/lkml/2012/1/14/55
With commit
f9d4861f ("ARM: 7294/1: vectors: use gate_vma for vectors user
mapping"), ARM does now use the gate_vma, so the PageReserved check can be
removed from the proc code.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Nicolas Pitre <nico@linaro.org>
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>
Anatolij Gustschin [Wed, 25 Apr 2012 23:01:51 +0000 (16:01 -0700)]
drivers/rtc/rtc-ds1307.c: fix BUG shown with lock debugging enabled
Add struct bin_attribute initialization to fix the following bug:
rtc-ds1307 3-0068: rtc core: registered ds1307 as rtc0
BUG: key
cfb14fcc not in .data!
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2986 sysfs_add_file_mode+0x84/0xdc()
Modules linked in:
[<
c0018d94>] (unwind_backtrace+0x0/0xf8) from [<
c0031f7c>] (warn_slowpath_common+0x4c/0x64)
[<
c0031f7c>] (warn_slowpath_common+0x4c/0x64) from [<
c0031fb0>] (warn_slowpath_null+0x1c/0x24)
[<
c0031fb0>] (warn_slowpath_null+0x1c/0x24) from [<
c012f7ac>] (sysfs_add_file_mode+0x84/0xdc)
[<
c012f7ac>] (sysfs_add_file_mode+0x84/0xdc) from [<
c04b11e4>] (ds1307_probe+0x5e4/0x6ac)
[<
c04b11e4>] (ds1307_probe+0x5e4/0x6ac) from [<
c036e600>] (i2c_device_probe+0xdc/0x108)
[<
c036e600>] (i2c_device_probe+0xdc/0x108) from [<
c02cdf84>] (driver_probe_device+0x90/0x210)
[<
c02cdf84>] (driver_probe_device+0x90/0x210) from [<
c02ce198>] (__driver_attach+0x94/0x98)
[<
c02ce198>] (__driver_attach+0x94/0x98) from [<
c02cc824>] (bus_for_each_dev+0x50/0x7c)
[<
c02cc824>] (bus_for_each_dev+0x50/0x7c) from [<
c02cd780>] (bus_add_driver+0x184/0x244)
[<
c02cd780>] (bus_add_driver+0x184/0x244) from [<
c02ce43c>] (driver_register+0x78/0x12c)
[<
c02ce43c>] (driver_register+0x78/0x12c) from [<
c03701ac>] (i2c_register_driver+0x2c/0xb4)
[<
c03701ac>] (i2c_register_driver+0x2c/0xb4) from [<
c0008798>] (do_one_initcall+0x34/0x178)
[<
c0008798>] (do_one_initcall+0x34/0x178) from [<
c0691860>] (kernel_init+0xdc/0x194)
[<
c0691860>] (kernel_init+0xdc/0x194) from [<
c0013cf0>] (kernel_thread_exit+0x0/0x8)
Since commit
6992f5334995af4 ("sysfs: Use one lockdep class per sysfs
attribute") this initialization is required.
Reported-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vasiliy Kulikov [Wed, 25 Apr 2012 23:01:51 +0000 (16:01 -0700)]
arch/arm/mach-ux500/mbox-db5500.c: world-writable sysfs fifo file
Don't allow everybody to use a modem.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Aneesh Kumar K.V [Wed, 25 Apr 2012 23:01:50 +0000 (16:01 -0700)]
hugetlbfs: lockdep annotate root inode properly
This fixes the below reported false lockdep warning.
e096d0c7e2e4
("lockdep: Add helper function for dir vs file i_mutex annotation") added
a similar annotation for every other inode in hugetlbfs but missed the
root inode because it was allocated by a separate function.
For HugeTLB fs we allow taking i_mutex in mmap. HugeTLB fs doesn't
support file write and its file read callback is modified in
a05b0855fd
("hugetlbfs: avoid taking i_mutex from hugetlbfs_read()") to not take
i_mutex. Hence for HugeTLB fs with regular files we really don't take
i_mutex with mmap_sem held.
======================================================
[ INFO: possible circular locking dependency detected ]
3.4.0-rc1+ #322 Not tainted
-------------------------------------------------------
bash/1572 is trying to acquire lock:
(&mm->mmap_sem){++++++}, at: [<
ffffffff810f1618>] might_fault+0x40/0x90
but task is already holding lock:
(&sb->s_type->i_mutex_key#12){+.+.+.}, at: [<
ffffffff81125f88>] vfs_readdir+0x56/0xa8
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&sb->s_type->i_mutex_key#12){+.+.+.}:
[<
ffffffff810a09e5>] lock_acquire+0xd5/0xfa
[<
ffffffff816a2f5e>] __mutex_lock_common+0x48/0x350
[<
ffffffff816a3325>] mutex_lock_nested+0x2a/0x31
[<
ffffffff811fb8e1>] hugetlbfs_file_mmap+0x7d/0x104
[<
ffffffff810f859a>] mmap_region+0x272/0x47d
[<
ffffffff810f8a39>] do_mmap_pgoff+0x294/0x2ee
[<
ffffffff810f8b65>] sys_mmap_pgoff+0xd2/0x10e
[<
ffffffff8103d19e>] sys_mmap+0x1d/0x1f
[<
ffffffff816a5922>] system_call_fastpath+0x16/0x1b
-> #0 (&mm->mmap_sem){++++++}:
[<
ffffffff810a0256>] __lock_acquire+0xa81/0xd75
[<
ffffffff810a09e5>] lock_acquire+0xd5/0xfa
[<
ffffffff810f1645>] might_fault+0x6d/0x90
[<
ffffffff81125d62>] filldir+0x6a/0xc2
[<
ffffffff81133a83>] dcache_readdir+0x5c/0x222
[<
ffffffff81125fa8>] vfs_readdir+0x76/0xa8
[<
ffffffff811260b6>] sys_getdents+0x79/0xc9
[<
ffffffff816a5922>] system_call_fastpath+0x16/0x1b
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&sb->s_type->i_mutex_key#12);
lock(&mm->mmap_sem);
lock(&sb->s_type->i_mutex_key#12);
lock(&mm->mmap_sem);
*** DEADLOCK ***
1 lock held by bash/1572:
#0: (&sb->s_type->i_mutex_key#12){+.+.+.}, at: [<
ffffffff81125f88>] vfs_readdir+0x56/0xa8
stack backtrace:
Pid: 1572, comm: bash Not tainted 3.4.0-rc1+ #322
Call Trace:
[<
ffffffff81699a3c>] print_circular_bug+0x1f8/0x209
[<
ffffffff810a0256>] __lock_acquire+0xa81/0xd75
[<
ffffffff810f38aa>] ? handle_pte_fault+0x5ff/0x614
[<
ffffffff8109e622>] ? mark_lock+0x2d/0x258
[<
ffffffff810f1618>] ? might_fault+0x40/0x90
[<
ffffffff810a09e5>] lock_acquire+0xd5/0xfa
[<
ffffffff810f1618>] ? might_fault+0x40/0x90
[<
ffffffff816a3249>] ? __mutex_lock_common+0x333/0x350
[<
ffffffff810f1645>] might_fault+0x6d/0x90
[<
ffffffff810f1618>] ? might_fault+0x40/0x90
[<
ffffffff81125d62>] filldir+0x6a/0xc2
[<
ffffffff81133a83>] dcache_readdir+0x5c/0x222
[<
ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
[<
ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
[<
ffffffff81125cf8>] ? sys_ioctl+0x74/0x74
[<
ffffffff81125fa8>] vfs_readdir+0x76/0xa8
[<
ffffffff811260b6>] sys_getdents+0x79/0xc9
[<
ffffffff816a5922>] system_call_fastpath+0x16/0x1b
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Dave Jones <davej@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Josh Boyer <jwboyer@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Peter Feuerer [Wed, 25 Apr 2012 23:01:49 +0000 (16:01 -0700)]
acerhdf: lowered default temp fanon/fanoff values
Due to new supported hardware, of which the actual temperature limits of
processor, harddisk and other components are unknown, it feels safer with
lower fanon / fanoff settings.
It won't change much for most people, already using acerhdf, as they use
their own fanon/fanoff variable settings when loading the module.
Furthermore seems like kernel and userspace tools have been improved to
work more efficient and netbooks don't get so hot anymore.
Signed-off-by: Peter Feuerer <peter@piie.net>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Peter Feuerer [Wed, 25 Apr 2012 23:01:49 +0000 (16:01 -0700)]
acerhdf: add support for new hardware
Add support for new hardware:
Acer Aspire LT-10Q/531/751/1810/1825,
Acer Travelmate 7730,
Packard Bell ENBFT/DOTVR46
Signed-off-by: Peter Feuerer <peter@piie.net>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Clay Carpenter [Wed, 25 Apr 2012 23:01:49 +0000 (16:01 -0700)]
acerhdf: add support for Aspire 1410 BIOS v1.3314
Add support for Aspire 1410 BIOS v1.3314. Fixes the following error:
acerhdf: unknown (unsupported) BIOS version Acer/Aspire 1410/v1.3314,
please report, aborting!
Signed-off-by: Clay Carpenter <claycarpenter@gmail.com>
Signed-off-by: Peter Feuerer <peter@piie.net>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Glauber Costa [Wed, 25 Apr 2012 23:01:48 +0000 (16:01 -0700)]
fs/buffer.c: remove BUG() in possible but rare condition
While stressing the kernel with with failing allocations today, I hit the
following chain of events:
alloc_page_buffers():
bh = alloc_buffer_head(GFP_NOFS);
if (!bh)
goto no_grow; <= path taken
grow_dev_page():
bh = alloc_page_buffers(page, size, 0);
if (!bh)
goto failed; <= taken, consequence of the above
and then the failed path BUG()s the kernel.
The failure is inserted a litte bit artificially, but even then, I see no
reason why it should be deemed impossible in a real box.
Even though this is not a condition that we expect to see around every
time, failed allocations are expected to be handled, and BUG() sounds just
too much. As a matter of fact, grow_dev_page() can return NULL just fine
in other circumstances, so I propose we just remove it, then.
Signed-off-by: Glauber Costa <glommer@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ying Han [Wed, 25 Apr 2012 23:01:48 +0000 (16:01 -0700)]
mm: fix up the vmscan stat in vmstat
The "pgsteal" stat is confusing because it counts both direct reclaim as
well as background reclaim. However, we have "kswapd_steal" which also
counts background reclaim value.
This patch fixes it and also makes it match the existng "pgscan_" stats.
Test:
pgsteal_kswapd_dma32 447623
pgsteal_kswapd_normal
42272677
pgsteal_kswapd_movable 0
pgsteal_direct_dma32 2801
pgsteal_direct_normal
44353270
pgsteal_direct_movable 0
Signed-off-by: Ying Han <yinghan@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jason Baron [Wed, 25 Apr 2012 23:01:47 +0000 (16:01 -0700)]
epoll: clear the tfile_check_list on -ELOOP
An epoll_ctl(,EPOLL_CTL_ADD,,) operation can return '-ELOOP' to prevent
circular epoll dependencies from being created. However, in that case we
do not properly clear the 'tfile_check_list'. Thus, add a call to
clear_tfile_check_list() for the -ELOOP case.
Signed-off-by: Jason Baron <jbaron@redhat.com>
Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
Cc: Nelson Elhage <nelhage@nelhage.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Tested-by: Alexandra N. Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Konstantin Khlebnikov [Wed, 25 Apr 2012 23:01:46 +0000 (16:01 -0700)]
mm/hugetlb: fix warning in alloc_huge_page/dequeue_huge_page_vma
Fix a gcc warning (and bug?) introduced in
cc9a6c877 ("cpuset: mm: reduce
large amounts of memory barrier related damage v3")
Local variable "page" can be uninitialized if the nodemask from vma policy
does not intersects with nodemask from cpuset. Even if it doesn't happens
it is better to initialize this variable explicitly than to introduce
a kernel oops in a weird corner case.
mm/hugetlb.c: In function `alloc_huge_page':
mm/hugetlb.c:1135:5: warning: `page' may be used uninitialized in this function
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Johannes Weiner [Tue, 24 Apr 2012 18:22:33 +0000 (20:22 +0200)]
mm: memcg: move pc lookup point to commit_charge()
None of the callsites actually need the page_cgroup descriptor
themselves, so just pass the page and do the look up in there.
We already had two bugs (
6568d4a 'mm: memcg: update the correct soft
limit tree during migration' and 'memcg: fix Bad page state after
replace_page_cache') where the passed page and pc were not referring
to the same page frame.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Miller [Wed, 25 Apr 2012 20:10:50 +0000 (16:10 -0400)]
mm: nobootmem: Correct alloc_bootmem semantics.
The comments above __alloc_bootmem_node() claim that the code will
first try the allocation using 'goal' and if that fails it will
try again but with the 'goal' requirement dropped.
Unfortunately, this is not what the code does, so fix it to do so.
This is important for nobootmem conversions to architectures such
as sparc where MAX_DMA_ADDRESS is infinity.
On such architectures all of the allocations done by generic spots,
such as the sparse-vmemmap implementation, will pass in:
__pa(MAX_DMA_ADDRESS)
as the goal, and with the limit given as "-1" this will always fail
unless we add the appropriate fallback logic here.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Chris Metcalf [Wed, 25 Apr 2012 16:45:26 +0000 (12:45 -0400)]
arch/tile: fix a couple of functions that should be __init
They were marked __devinit by mistake, causing some warnings at link time.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Chris Metcalf [Fri, 6 Apr 2012 16:53:50 +0000 (12:53 -0400)]
init: fix bug where environment vars can't be passed via boot args
Commit
026cee0086f had the side-effect of dropping the '=' from
the unknown boot arguments that are passed to init as environment
variables. This is because parse_args() puts a NUL in the string
where the '=' was when it passes the "param" and "val" pointers
to the parsing subfunctions. Previously, unknown_bootoption() was
the last parse_args() subfunction to run, and it carefully put back
the '=' character. Now the ignore_unknown_bootoption() is the last
one to run, and it wasn't doing the necessary repair, so the
envp params ended up with the embedded NUL and were no longer
seen as valid environment variables by init.
Tested-by: Woody Suwalski <terraluna977@gmail.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Davide Ciminaghi [Thu, 19 Apr 2012 10:20:24 +0000 (12:20 +0200)]
dmaengine/amba-pl08x : reset phychan_hold on terminate all
When a client calls pl08x_control with DMA_TERMINATE_ALL, it is correct
to terminate and release the phy channel currently in use (if one is in use),
but the phychan_hold counter must also be reset (otherwise it could get
trapped in an unbalanced state).
Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Reviewed-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Olof Johansson [Sun, 8 Apr 2012 23:26:19 +0000 (16:26 -0700)]
dma: pl330: fix a couple of compilation warnings
Move a couple of tests and do a minor refactor to avoid:
drivers/dma/pl330.c: In function 'pl330_probe':
drivers/dma/pl330.c:2929:215: warning: comparison of distinct pointer types lacks a cast [enabled by default]
drivers/dma/pl330.c: In function 'pl330_tasklet':
drivers/dma/pl330.c:2250:8: warning: 'pch' may be used uninitialized in this function [-Wuninitialized]
drivers/dma/pl330.c:2228:25: note: 'pch' was declared here
drivers/dma/pl330.c:2277:130: warning: 'pch' may be used uninitialized in this function [-Wuninitialized]
drivers/dma/pl330.c:2260:25: note: 'pch' was declared here
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Roland Dreier [Tue, 24 Apr 2012 23:11:46 +0000 (16:11 -0700)]
Merge branches 'mad-response' and 'mlx4' into fixes
Jesper Juhl [Wed, 11 Apr 2012 21:43:29 +0000 (23:43 +0200)]
IB/mlx4: Fix memory leaks in ib_link_query_port()
If the call to mlx4_MAD_IFC() fails in ib_link_query_port() we will
currently do 'return err;' which will leak 'in_mad' and 'out_mad'. We
should instead do 'goto out;' where we'll properly free the memory we
previously allocated.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Jack Morgenstein [Tue, 24 Apr 2012 23:08:57 +0000 (16:08 -0700)]
IB/mad: Don't send response for failed MADs
Commit
0b307043049f ("IB/mad: Return error response for unsupported
MADs") does not failed MADs (eg those that return
IB_MAD_RESULT_FAILURE) properly -- these MADs should be silently
discarded. (We should not force the lower-layer drivers to return
SUCCESS | CONSUMED in this case, since the MAD is NOT successful).
Unsupported MADs are not failures -- they return SUCCESS, but with an
"unsupported error" status value inside the response MAD.
Reviewed-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Jack Morgenstein [Tue, 24 Apr 2012 23:06:50 +0000 (16:06 -0700)]
IB/mad: Set 'D' bit in response for unhandled MADs
Commit
0b307043049f ("IB/mad: Return error response for unsupported
MADs") does not handle directed-route MADs properly -- it fails to set
the 'D' bit in the response MAD status field. This is a problem for
SmInfo MADs when the receiver does not have an SM running.
Reviewed-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Linus Torvalds [Tue, 24 Apr 2012 15:22:25 +0000 (08:22 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-3.0-fixes
Pull gfs2 fixes from Steven Whitehouse.
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
GFS2: Instruct DLM to avoid queue convert slowdown
Linus Torvalds [Tue, 24 Apr 2012 15:20:28 +0000 (08:20 -0700)]
Merge tag 'hsi_fixes_for_3.4' of git://gitorious.org/kernel-hsi/kernel-hsi
Pull HSI fixes and ABI documentation from Carlos Chinea
* tag 'hsi_fixes_for_3.4' of git://gitorious.org/kernel-hsi/kernel-hsi:
HSI: Add HSI ABI documentation
HSI: hsi_char: Remove max_data_size from sysfs
HSI: hsi: Rework hsi_event interface
HSI: hsi: Remove controllers and ports from the bus
HSI: hsi: Fix error path cleanup on client registration
HSI: hsi: Rework hsi_controller release
Bob Peterson [Tue, 10 Apr 2012 18:45:24 +0000 (14:45 -0400)]
GFS2: Instruct DLM to avoid queue convert slowdown
This patch instructs DLM to prevent an "in place" conversion, where the
lock just stays on the granted queue, and instead forces the conversion to
the back of the convert queue. This is done on upward conversions only.
This is useful in cases where, for example, a lock is frequently needed in
PR on one node, but another node needs it temporarily in EX to update it.
This may happen, for example, when the rindex is being updated by gfs2_grow.
The gfs2_grow needs to have the lock in EX, but the other nodes need to
re-read it to retrieve the updates. The glock is already granted in PR on
the non-growing nodes, so this prevents them from continually re-granting
the lock in PR, and forces the EX from gfs2_grow to go through.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Linus Torvalds [Tue, 24 Apr 2012 02:52:00 +0000 (19:52 -0700)]
Merge tag 'ext4_for_linus' of git://git./linux/kernel/git/tytso/ext4
Pull ext4 bug fixes from Ted Ts'o:
"These are two low-risk bug fixes for ext4, fixing a compile warning
and a potential deadlock."
* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
super.c: unused variable warning without CONFIG_QUOTA
jbd2: use GFP_NOFS for blkdev_issue_flush
Linus Torvalds [Tue, 24 Apr 2012 02:50:48 +0000 (19:50 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rkuo/linux-hexagon-kernel
Pull Hexagon fixes from Richard Kuo:
"It's mostly compile fixes and the Hexagon portion of a CPU hotplug
patch set."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
hexagon: add missing cpu.h include
hexagon/CPU hotplug: Add missing call to notify_cpu_starting()
hexagon: use renamed tick_nohz_idle_* functions
Hexagon: misc compile warning/error cleanup due to missing headers
Linus Torvalds [Tue, 24 Apr 2012 02:45:19 +0000 (19:45 -0700)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild
Pull build system failure fix from Michal Marek:
"This fixes build failure with newer gcc that adds some internal
symbols that end in "__mod_*_device_table", but are not actually the
tables themselves."
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
Fix modpost failures in fedora 17
Eldad Zack [Sun, 22 Apr 2012 15:50:52 +0000 (17:50 +0200)]
super.c: unused variable warning without CONFIG_QUOTA
sb info is only checked with quota support.
fs/ext4/super.c: In function ‘parse_options’:
fs/ext4/super.c:1600:23: warning: unused variable ‘sbi’ [-Wunused-variable]
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Shaohua Li [Fri, 13 Apr 2012 02:27:35 +0000 (10:27 +0800)]
jbd2: use GFP_NOFS for blkdev_issue_flush
flush request is issued in transaction commit code path, so looks using
GFP_KERNEL to allocate memory for flush request bio falls into the classic
deadlock issue. I saw btrfs and dm get it right, but ext4, xfs and md are
using GFP.
Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org
Linus Torvalds [Tue, 24 Apr 2012 01:25:01 +0000 (18:25 -0700)]
Merge tag 'md-3.4-fixes' of git://neil.brown.name/md
Pull a few more md bug fixes from NeilBrown:
"2 are tagged for -stable, one being for a fairly serious bug that can
corrupt metadata and make it hard to recovery an array. The other is
for a more recent regression since 3.3"
* tag 'md-3.4-fixes' of git://neil.brown.name/md:
md: fix possible corruption of array metadata on shutdown.
md: don't call ->add_disk unless there is good reason.
DM RAID: Use safe version of rdev_for_each
Linus Torvalds [Tue, 24 Apr 2012 01:22:42 +0000 (18:22 -0700)]
Merge tag 'dlm-fixes-3.4' of git://git./linux/kernel/git/teigland/linux-dlm
Pull dlm fixes from David Teigland:
"This includes one short patch fixing the behavior of the QUECVT flag,
which the gfs2 folks are waiting on."
* tag 'dlm-fixes-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
dlm: fix QUECVT when convert queue is empty
Hugh Dickins [Mon, 23 Apr 2012 18:14:50 +0000 (11:14 -0700)]
mm: fix s390 BUG by __set_page_dirty_no_writeback on swap
Mel reports a BUG_ON(slot == NULL) in radix_tree_tag_set() on s390
3.0.13: called from __set_page_dirty_nobuffers() when page_remove_rmap()
tries to transfer dirty flag from s390 storage key to struct page and
radix_tree.
That would be because of reclaim's shrink_page_list() calling
add_to_swap() on this page at the same time: first PageSwapCache is set
(causing page_mapping(page) to appear as &swapper_space), then
page->private set, then tree_lock taken, then page inserted into
radix_tree - so there's an interval before taking the lock when the
radix_tree slot is empty.
We could fix this by moving __add_to_swap_cache()'s spin_lock_irq up
before the SetPageSwapCache. But a better fix is simply to do what's
five years overdue: Ken Chen introduced __set_page_dirty_no_writeback()
(if !PageDirty TestSetPageDirty) for tmpfs to skip all the radix_tree
overhead, and swap is just the same - it ignores the radix_tree tag, and
does not participate in dirty page accounting, so should be using
__set_page_dirty_no_writeback() too.
s390 testing now confirms that this does indeed fix the problem.
Reported-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Ken Chen <kenchen@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
H. Peter Anvin [Mon, 23 Apr 2012 23:34:12 +0000 (16:34 -0700)]
x32, siginfo: Provide proper overrides for x32 siginfo_t
Provide the proper override macros for x32 siginfo_t. The combination
of a special type here and an overall alignment constraint actually
ends up with all the types being properly aligned, but the hack is
needed to keep the substructures inside siginfo_t from adding padding.
Note: use __attribute__((aligned())) since __aligned() is not exported
to user space.
[ v2: fix stray semicolon ]
Reported-by: H.J. Lu <hjl.rools@gmail.com>
Cc: Bruce J. Beare <bruce.j.beare@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: http://lkml.kernel.org/r/CAMe9rOqF6Kh6-NK7oP0Fpzkd4SBAWU%2BG53hwBbSD4iA2UzyxuA@mail.gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
NeilBrown [Tue, 24 Apr 2012 00:23:16 +0000 (10:23 +1000)]
md: fix possible corruption of array metadata on shutdown.
commit
c744a65c1e2d59acc54333ce8
md: don't set md arrays to readonly on shutdown.
removed the possibility of a 'BUG' when data is written to an array
that has just been switched to read-only, but also introduced the
possibility that the array metadata could be corrupted.
If, when md_notify_reboot gets the mddev lock, the array is
in a state where it is assembled but hasn't been started (as can
happen if the personality module is not available, or in other unusual
situations), then incorrect metadata will be written out making it
impossible to re-assemble the array.
So only call __md_stop_writes() if the array has actually been
activated.
This patch is needed for any stable kernel which has had the above
commit applied.
Cc: stable@vger.kernel.org
Reported-by: Christoph Nelles <evilazrael@evilazrael.de>
Signed-off-by: NeilBrown <neilb@suse.de>
NeilBrown [Tue, 24 Apr 2012 00:23:14 +0000 (10:23 +1000)]
md: don't call ->add_disk unless there is good reason.
Commit
7bfec5f35c68121e7b18
md/raid5: If there is a spare and a want_replacement device, start replacement.
cause md_check_recovery to call ->add_disk much more often.
Instead of only when the array is degraded, it is now called whenever
md_check_recovery finds anything useful to do, which includes
updating the metadata for clean<->dirty transition.
This causes unnecessary work, and causes info messages from ->add_disk
to be reported much too often.
So refine md_check_recovery to only do any actual recovery checking
(including ->add_disk) if MD_RECOVERY_NEEDED is set.
This fix is suitable for 3.3.y:
Cc: stable@vger.kernel.org
Reported-by: Jan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Jonathan Brassow [Tue, 24 Apr 2012 00:23:13 +0000 (10:23 +1000)]
DM RAID: Use safe version of rdev_for_each
Fix segfault caused by using rdev_for_each instead of rdev_for_each_safe
Commit
dafb20fa34320a472deb7442f25a0c086e0feb33 mistakenly replaced a safe
iterator with an unsafe one when making some macro changes.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
H. Peter Anvin [Mon, 23 Apr 2012 23:29:18 +0000 (16:29 -0700)]
asm-generic: Allow overriding clock_t and add attributes to siginfo_t
For the particular issue of x32, which shares code with i386 in the
handling of compat_siginfo_t, the use of a 64-bit clock_t bumps the
sigchld structure out of alignment, which triggers a messy cascade of
padding.
This was already handled on the kernel compat side, but it needs
handling on the user space side, which uses the generic header. To
make that possible:
1. Allow __kernel_clock_t to be overridden in struct siginfo;
2. Allow there to be attributes added to struct siginfo.
Reported-by: H.J. Lu <hjl.rools@gmail.com>
Cc: Bruce J. Beare <bruce.j.beare@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Link: http://lkml.kernel.org/r/CAMe9rOqF6Kh6-NK7oP0Fpzkd4SBAWU%2BG53hwBbSD4iA2UzyxuA@mail.gmail.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
H.J. Lu [Mon, 23 Apr 2012 21:51:14 +0000 (14:51 -0700)]
x32: Check __ILP32__ instead of __LP64__ for x32
Check __LP64__ isn't a reliable way to tell if we are compiling for x32
since __LP64__ isnn't specified by x86-64 psABI. Not all x86-64
compilers define __LP64__, which was added to GCC 3.3. The updated x32
psABI:
https://sites.google.com/site/x32abi/documents
definse _ILP32 and __ILP32__ for x32. GCC trunk and 4.7 branch have
been updated to define _ILP32 and __ILP32__ for x32. This patch
replaces __LP64__ check with __ILP32__.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Konrad Rzeszutek Wilk [Mon, 23 Apr 2012 03:03:18 +0000 (23:03 -0400)]
x86, acpi: Call acpi_enter_sleep_state via an asmlinkage C function from assembler
With commit
a2ef5c4fd44ce3922435139393b89f2cce47f576
"ACPI: Move module parameter gts and bfs to sleep.c" the
wake_sleep_flags is required when calling acpi_enter_sleep_state.
The assembler code in wakeup_*.S did not do that. One solution
is to call it from assembler and stick the wake_sleep_flags on
the stack (for 32-bit) or in %esi (for 64-bit). hpa and rafael
both suggested however to create a wrapper function to call
acpi_enter_sleep_state and call said wrapper function
("acpi_enter_s3") from assembler.
For 32-bit, the acpi_enter_s3 ends up looking as so:
push %ebp
mov %esp,%ebp
sub $0x8,%esp
movzbl 0xc1809314,%eax [wake_sleep_flags]
movl $0x3,(%esp)
mov %eax,0x4(%esp)
call 0xc12d1fa0 <acpi_enter_sleep_state>
leave
ret
And 64-bit:
movzbl 0x9afde1(%rip),%esi [wake_sleep_flags]
push %rbp
mov $0x3,%edi
mov %rsp,%rbp
callq 0xffffffff812e9800 <acpi_enter_sleep_state>
leaveq
retq
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Suggested-by: H. Peter Anvin <hpa@zytor.com>
[v2: Remove extra assembler operations, per hpa review]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Link: http://lkml.kernel.org/r/1335150198-21899-3-git-send-email-konrad.wilk@oracle.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Konrad Rzeszutek Wilk [Mon, 23 Apr 2012 03:03:17 +0000 (23:03 -0400)]
ACPI: Convert wake_sleep_flags to a value instead of function
With commit
a2ef5c4fd44ce3922435139393b89f2cce47f576
"ACPI: Move module parameter gts and bfs to sleep.c" the wake_sleep_flags
is required when calling acpi_enter_sleep_state, which means
that if there are functions outside the sleep.c code they
can't get the wake_sleep_flags values.
This converts the function in to a exported value and converts
the module config operands to a function.
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Lin Ming <ming.m.lin@intel.com>
[v2: Parameters can be turned on/off dynamically]
[v3: unsigned char -> u8]
[v4: val -> kp->arg]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Link: http://lkml.kernel.org/r/1335150198-21899-2-git-send-email-konrad.wilk@oracle.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Richard Kuo [Thu, 12 Apr 2012 20:57:33 +0000 (15:57 -0500)]
hexagon: add missing cpu.h include
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Srivatsa S. Bhat [Thu, 22 Mar 2012 11:28:25 +0000 (16:58 +0530)]
hexagon/CPU hotplug: Add missing call to notify_cpu_starting()
The scheduler depends on receiving the CPU_STARTING notification, without
which we end up into a lot of trouble. So add the missing call to
notify_cpu_starting() in the bringup code.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Richard Kuo [Wed, 7 Mar 2012 21:27:23 +0000 (15:27 -0600)]
hexagon: use renamed tick_nohz_idle_* functions
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Richard Kuo [Tue, 15 Nov 2011 22:58:11 +0000 (16:58 -0600)]
Hexagon: misc compile warning/error cleanup due to missing headers
Fixed warnings/errors for EXPORT_SYMBOL, linux_binprm, elf related
defines
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Takashi Iwai [Mon, 23 Apr 2012 16:39:47 +0000 (18:39 +0200)]
Merge tag 'asoc-3.4' of git://git./linux/kernel/git/broonie/sound into for-linus
ASoC: updates for 3.4
Slightly larger than normal - the DAPM fix is a "this should always have
worked" type of thing which is very clear and should have no impact on
systems that don't need it. The WM8994 fix is driver specific but
pretty important for that driver.
David Teigland [Wed, 4 Apr 2012 14:49:15 +0000 (09:49 -0500)]
dlm: fix QUECVT when convert queue is empty
The QUECVT flag should not prevent conversions from
being granted immediately when the convert queue is
empty.
Signed-off-by: David Teigland <teigland@redhat.com>