Commit Graph

300161 Commits

Author SHA1 Message Date
Paul Mundt c5e50fa90c sh: Provide stubbed I/O routines for NO_IOPORT case.
Too many drivers fail at IOPORT vs IOMEM checking before blindly calling
in to the API, so we may as well just provide basic stubs to get more
build coverage. Other platforms already do this, too (tile, parisc, etc.)

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-10 13:07:55 +09:00
Paul Mundt 15f99cbd07 Merge branch 'sh/rsk-updates' into sh-latest
Conflicts:
	arch/sh/Kconfig

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-10 11:51:07 +09:00
Phil Edworthy 41797f7548 sh: Add pinmux for sh7264
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-10 11:49:58 +09:00
Phil Edworthy d584e204ff sh: Add RSK2+SH7264 board
The RSK2+SH7264 board uses the sh7264 processor. It is often
referred to as just rsk7264. NOR Flash, SDRAM, serial, USB Host and
ethernet are working.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-10 11:49:56 +09:00
Phil Edworthy 51ce30684e sh: Add sh7264 device
This is an sh2a device with FPU, video display controller (VDC),
8 serial ports, 3 I2C channels, 2 CAN ports, SD and on-chip USB.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-10 11:49:54 +09:00
Linus Torvalds 7ee94d97aa ARM: SoC fixes for 3.4-rc
Things have slowed down a lot for us, but we have five more fixes for
 omap and kirkwood below. Three are for boards setup issues, two are
 SoC-level fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPqpiAAAoJEIwa5zzehBx36WcP/A3yfgwccYQPAGiazDWMoxj+
 bLdr49L4tgFf8dwRno+IeAKjhhBDYUJgNoz46Tnqfh1L7ImIvGUlPDtqfQGb5+HK
 HZ+mz46ZUoJPdvBS8CY7Xf5lP/5iiMI+wBeE33bu+EyKhgbD8wYmQDCsJJhjjRLW
 TqR/a74Mz/yX9sCL5pZ/ktKhxV/FvBMT3pqpU8Eb50hDtStTouf25EmyLv0iVmJx
 45pwG3+nx6R+/Lu2rwCroKUTl/cNR95L9+EGMzb99aZXSsGS5zmiAEQ2TNcp0lxb
 JMR3bB9zTDWmY1VZ83os2NI1GDOj1Zdvqns/iiBRKLUBvFN447tMdRvZMomvM3VQ
 whiKd5R0aFa42KROZq7V+t540FeLqgDvHY4zeOPDRGrh1Y9ElgCJnciX4Hxm779n
 KH9VlnHrUW3tNHqlLKXTJ1tuvNSbNUE2FtG/m+oJLyUyH4CJzNi1R1rofZEEHEH/
 8zeJzw6amwpSWyLEi1HjyhFOJ8WqOnY17LMWilQeeYbqHGwXGKTOmm9P8PKPk4cx
 dFlwCeJgd7VL+L5rn8LVOjvov7j1iakKZhtSjLMjF4k088MejDVOfTj21Qs5MiHI
 nl03BOvtmwEGXUbYHKromzeHMvoXXWuQyK13cWmgBXAiAGgX76mNU9GukwXU3rqm
 TGrRTsiuGzYQn9w3EVFL
 =GX6x
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM: SoC fixes from Olof Johansson:
 "Things have slowed down a lot for us, but we have five more fixes for
  omap and kirkwood below.  Three are for boards setup issues, two are
  SoC-level fixes."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: OMAP: igep0020: fix smsc911x dummy regulator id
  ARM: orion5x: Fix GPIO enable bits for MPP9
  ARM: kirkwood: add missing kexec.h include
  ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY register fields"
  ARM: OMAP1: Amstrad Delta: Fix wrong IRQ base in FIQ handler
2012-05-09 11:27:00 -07:00
Linus Torvalds 22b6dd78ae regmap: Last minute bug fix for 3.4
This is a last minute bug fix that was only just noticed since the code
 path that's being exercised here is one that is fairly rarely used.  The
 changelog for the change itself is extremely clear and the code itself
 is obvious to inspection so should be pretty safe.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPqoQhAAoJEBus8iNuMP3dj1kP/0Z1yIk1ME0KzSy42/qbGKsp
 +2mrAASkh7DbbWU2hSmwTpEgAAiY2ws0A/Uyj/Al4f/gJW6bZvlxK4mbf1i+P1LG
 ab3ohhUOqexHVaIKMTnYKhnHWuzU25mnf2vW8IOr6jccu6h7X4orDmw1uEPVgsbs
 P7fThQa0BPRkiLIUWGmg0oMY6IXJlzsStDK2Npw47EypY4FZCZucJgXkmYZLt0Nk
 mhLPsznD5GqHNSmCqrUI3j/s3R0sd/Xc63pvznBU9D8RAbSRgi2vGL8UenEtIQgt
 bVXOKe5H8ZzXYNYpzpGeJm3dTE2pZWmT1hfRSf0kBOkLhEpt/Oy9WBj1kfoTg9n9
 fNH6OJYn12uG0qQomiAT96Qm3qrslF5y9S64ZyHT6BAkJT87wnEqTmaQkoAevDEr
 hldzT+dTPAk2Pspge8m910+kQA72YyE1z6/PikvkEepYDFrqffZcBFWqjW8aQjGj
 /5r7F5fLC7zJku0FjYUMRYDgYc9z0lk6tDt8QL7E7j+55ntrhYR8IuTQA7g2asal
 yeQSTqa/NkJcch+aULgyOU0W9U1z2i04mdGI74iJnf3DSGGmvJ95IYLJA4tfnIOw
 63xo2BhmHVGyRqTN5l7o5Zlgf5FdcUt+5EBLudSqqZynB/tMZNgb0PEzfIRFBuRq
 GSIm5dwIqKgtymCEOUmp
 =xcal
 -----END PGP SIGNATURE-----

Merge tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Pull last minute regman bug fix from Mark Brown:
 "This is a last minute bug fix that was only just noticed since the
  code path that's being exercised here is one that is fairly rarely
  used.  The changelog for the change itself is extremely clear and the
  code itself is obvious to inspection so should be pretty safe."

* tag 'regmap-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: fix possible memory corruption in regmap_bulk_read()
2012-05-09 11:25:45 -07:00
Linus Torvalds 63f4711aec Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Avi Kivity:
 "Two asynchronous page fault fixes (one guest, one host), a powerpc
  page refcount fix, and an ia64 build fix."

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: ia64: fix build due to typo
  KVM: PPC: Book3S HV: Fix refcounting of hugepages
  KVM: Do not take reference to mm during async #PF
  KVM: ensure async PF event wakes up vcpu from halt
2012-05-09 11:14:13 -07:00
Linus Torvalds 6a5beacca8 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc fixes from Benjamin Herrenschmidt:
 "Here are a couple of last minute fixes for 3.4 for regressions
  introduced by my rewrite of the lazy irq masking code."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/irq: Make alignment & program interrupt behave the same
  powerpc/irq: Fix bug with new lazy IRQ handling code
2012-05-09 11:07:29 -07:00
Olof Johansson e396dbd4ed Fix two board spefific regressions and one regression caused by bad documentation
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPqowwAAoJEBvUPslcq6VzDPQP/1LBOfJb6OMdK+lfDA49tMtU
 q/Qzq5GvgKA7+Opb3n5TVpnXh1cT7tSrvDtYI/ol8KaCVkLLoxdIO1dJekPyX81H
 +W4JoUYOLDAKfJ7FP44K7MJu/TsXsQ22Hyv6hYKw9lfm9rzIQwp/ofD08g9HDubc
 j6BbrIH/mBEIheJPor1Iz1j+A50EImKpkixrfD9ttJfJkwu3FmzDp+KvLNhzDX7H
 VCCYatJIkJPXEqIwaVjOyAqSvU3ZHFLxkFVjzRwkLpd2bNA1KX/FjOzv4lrK4jf3
 A2eEce/YSPrNn8KhM+mB/UKLLJ3ifgUvDS6IsvVkxwsPUyGpEwFL1KBEiAlVfApq
 WWxC/WZcZgHlXs4WRH/FS5ERLuPhaom+YkSs8bZRqAGxtA8RO1E6yNG6fzlp84/B
 LFxKa7TXEMCmSoRye6rZ4gmndCQ+8q0OQv1M89aHvn/iv7arS8XtWLGzp01qAQzQ
 OX8CCRxiRxJd9g3nCLhGq77UTI89ZiP86562Df50Akc2SYPCrw2hPR1rYjzU1TCl
 2nVQsDhSJDcGTuIVClTUmbUMM34RJQxlxAgxBJkDPshNjXiV0qMzYe+U1t4HjArE
 IBfshxY0qL6x8y2cdoeDkSpSyhjbeHZqPHYJ/nGFCkTNCQF1+c6o3NqYmdtd+bsF
 bAF1qF3FGhjXubgzpOzM
 =k8QU
 -----END PGP SIGNATURE-----

Merge tag 'omap-fixes-for-v3.4-rc6-take-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Fix two board spefific regressions and one regression caused by bad documentation

By Archit Taneja (1) and others
via Tony Lindgren
* tag 'omap-fixes-for-v3.4-rc6-take-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: igep0020: fix smsc911x dummy regulator id
  ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY register fields"
  ARM: OMAP1: Amstrad Delta: Fix wrong IRQ base in FIQ handler
2012-05-09 09:03:34 -07:00
Enrico Butera 1a21932edc ARM: OMAP: igep0020: fix smsc911x dummy regulator id
id 0 is already used and causes errors at boot:

WARNING: at fs/sysfs/dir.c:508 sysfs_add_one+0x9c/0xac()
sysfs: cannot create duplicate filename '/devices/platform/reg-fixed-voltage.0'

Fix it by using the next available one (id=1).

This was caused by 5b3689f4 (ARM: OMAP2+: smsc911x: Add fixed
board regulators) that did not account for some regulators
already being used.

Signed-off-by: Enrico Butera <ebutera@users.berlios.de>
[tony@atomide.com: updated comments for regression causing commit]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-05-09 08:12:05 -07:00
Laxman Dewangan 6560ffd1cc regmap: fix possible memory corruption in regmap_bulk_read()
The function regmap_bulk_read() calls the regmap_read() for
each register if set of register has volatile and cache is
enabled. In this case, last few register read makes the memory
corruption if the register size is not the size of unsigned int.
The regam_read() takes argument as unsigned int for returning
value and it update the value as
	*val = map->format.parse_val(map->work_buf);
This causes complete 4 bytes (size of unsigned int) to get written.
Now if client pass the memory pointer for value which is equal to the
required size of register count in regmap_bulk_read() then last few
register read actually update the memory beyond passed pointer size.

Avoid this by using local variable for read and then do memcpy()
for actual byte copy to passed pointer based on register size.

I allocated one pointer ptr and take first 16 bytes dump of that
pointer then call regmap_bulk_read() with pointer which is just
on top of this allocated pointer and register count of 128. Here
register size is 1 byte.
The memory trace of last 5 register read are as follows:

[    5.438589] regmap_bulk_read after regamp_read() for register 122
[    5.447421] 0xef993c20 0xef993c00 0x00000000 0x00000001
[    5.467535] regmap_bulk_read after regamp_read() for register 123
[    5.476374] 0xef993c20 0xef993c00 0x00000000 0x00000001
[    5.496425] regmap_bulk_read after regamp_read() for register 124
[    5.505260] 0xef993c20 0xef993c00 0x00000000 0x00000001
[    5.525372] regmap_bulk_read after regamp_read() for register 125
[    5.534205] 0xef993c00 0xef993c00 0x00000000 0x00000001
[    5.554258] regmap_bulk_read after regamp_read() for register 126
[    5.563100] 0xef990000 0xef993c00 0x00000000 0x00000001
[    5.554258] regmap_bulk_read after regamp_read() for register 127
[    5.587108] 0xef000000 0xef993c00 0x00000000 0x00000001

Here it is observed that the memory content at first word started changing
on last 3 regmap_read() and so corruption happened.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-09 15:44:11 +01:00
Avi Kivity 331b646d60 KVM: ia64: fix build due to typo
s/kcm/kvm/.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-05-09 13:53:28 +03:00
Olof Johansson 973076ae0a Merge branch 'kirkwood_fixes_for_v3.4' of git://git.infradead.org/users/jcooper/linux-kirkwood into fixes
By Ben Hutchings (1) and Ian Campbell (1)
via Jason Cooper: "ARM: kirkwood: fixes for v3.4"
* 'kirkwood_fixes_for_v3.4' of git://git.infradead.org/users/jcooper/linux-kirkwood:
  ARM: orion5x: Fix GPIO enable bits for MPP9
  ARM: kirkwood: add missing kexec.h include
2012-05-09 00:05:25 -07:00
Benjamin Herrenschmidt a3512b2dd5 powerpc/irq: Make alignment & program interrupt behave the same
Alignment was the last user of the ENABLE_INTS macro, which we can
now remove. All non-syscall exceptions now disable interrupts on
entry, they get re-enabled conditionally from C code. Don't
unconditionally re-enable in program check either, check the
original context.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-05-09 09:42:33 +10:00
Benjamin Herrenschmidt 56dfa7fa19 powerpc/irq: Fix bug with new lazy IRQ handling code
We had a case where we could turn on hard interrupts while
leaving the PACA_IRQ_HARD_DIS bit set in the PACA. This can
in turn cause a BUG_ON() to hit in __check_irq_replay() due
to interrupt state getting out of sync.

The assembly code was also way too convoluted. Instead, we
now leave it to the C code to do the right thing which ends
up being smaller and more readable.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-05-09 09:42:21 +10:00
Ben Hutchings 48d99f47a8 ARM: orion5x: Fix GPIO enable bits for MPP9
Commit 554cdaefd1 ('ARM: orion5x: Refactor
mpp code to use common orion platform mpp.') seems to have accidentally
inverted the GPIO valid bits for MPP9 (only).  For the mv2120 platform
which uses MPP9 as a GPIO LED device, this results in the error:

[   12.711476] leds-gpio: probe of leds-gpio failed with error -22

Reported-by: Henry von Tresckow <hvontres@gmail.com>
References: http://bugs.debian.org/667446
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org [v3.0+]
Tested-by: Hans Henry von Tresckow <hvontres@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-05-08 18:57:21 +00:00
Linus Torvalds 1eef1600af regulator: A couple of fixes for 3.4
One small fix for an edge condition in the max8997 driver and a fix for
 a surprise in the devres API which caused devm_regulator_put() to not
 actually put the regulator - a nicer version of this based on an
 improvement of the devres API is queued for 3.5.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPp99CAAoJEBus8iNuMP3d7VwP/387BkvdNpC0UwWKomSJ9G2+
 bwRXqKGUcRX2yB1EBs+jPyx1kUk1J/a2iVeJ3oC54gPWLOB/lbMvld9wRMqziplq
 0bTR+Hjeflh+WAAhnGHHvKZR+lxT3oz8FjESq9xVQYroB6ZLSCfbf9FWO2wcfyzo
 Pc/qa0UOV98UPYPvcAG2ixBn/VLL6jAZNupnwPcWb9tVlGWeyHakLMS46oJnESGw
 wUUYSWaxEQzvNx91DqeRdJmvINh9WjT4nwQMeoiUGnAXc2wpm0mUu9Ac+c0fMcd5
 NG/ojZX7kLB8sgjWNG9IQrYaxz53F7LaqyOwmOAI/ld16hp/6SPT+fgIBR64cR3s
 4UmjLnr5EYjiumzztz5QyGs+BlbVSgUy5z615c4vGpwxfPL/MQ54K8ngW3hQWZiH
 GH6TvQncxigoPjwB3OJwxXozCCEmYOqRDAP9C7CvKcZzVehUyaDCRPSwCr0NRnj2
 /bZXRlVOeWmXO2eN9Tr/l1kLY6S13gMkldLDcbJFykko1DD422bV3nsXU24EF0uD
 Rxb+S1WA1Hd435DYYTEnh727LLvECO8bOQQ0f7hqEO5Dv+pfqzd8afVn+KQdNK7v
 wN4w2MdgtvoEfTy6ciVDXBJR1/NR5uJsA6ryzo7N092e3vn7f8DQOHFyk4slHHBp
 23gCXM7LYO6cUdJqMv9K
 =Q7eh
 -----END PGP SIGNATURE-----

Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "One small fix for an edge condition in the max8997 driver and a fix
  for a surprise in the devres API which caused devm_regulator_put() to
  not actually put the regulator - a nicer version of this based on an
  improvement of the devres API is queued for 3.5."

* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Actually free the regulator in devm_regulator_put()
  regulator: Fix the logic to ensure new voltage setting in valid range
2012-05-08 11:49:30 -07:00
Ian Campbell a7ac56de83 ARM: kirkwood: add missing kexec.h include
Fixes the following build error when CONFIG_KEXEC is enabled:
  CC      arch/arm/mach-kirkwood/board-dt.o
arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function)
arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
[v4, rebase onto recent Linus for repost]
[v3, speak actual English in the commit message, thanks Sergei Shtylyov]
[v2, using linux/kexec.h not asm/kexec.h]
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2012-05-08 18:43:25 +00:00
Linus Torvalds 789505b057 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Two fixes from Intel, one a regression, one because I merged an early
  version of a fix.

  Also the nouveau revert of the i2c code that was tested on the list."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau/i2c: resume use of i2c-algo-bit, rather than custom stack
  drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+
  drm/i915: disable sdvo hotplug on i945g/gm
2012-05-08 11:20:47 -07:00
Linus Torvalds 4ed6cedeef Innocuous fixes:
* fix to Kconfig to make it fit within 80 line characters,
  * two bootup fixes (AMD 8-core and with PCI BIOS),
  * cleanup code in a Xen PV fb driver,
  * and a crash fix when trying to see non-existent PTE's
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAABAgAGBQJPp/iaAAoJEFjIrFwIi8fJAFsH/1NVxvOAHyzyczU49U/1vi8T
 d67kIb8fFHni6HO7BiBkuM8DricGQnDhP7uC1n9waWf8jRiYsPTAbesyedTLbQos
 SLfzpsLWKilJOxWCf17cBnm6i9ScQn1ioJ6h3jFzHgNCXnvvAVYqfKHW0V6HTErH
 JL0eb4+asiZgXNSeac1gabQlai6LuBzMWaFgzRGY+hDnCQhkdQfDkD7X5zEhUUmH
 jUmtSxRx+5LkfelwRb2kHhI5j58ilOEa7YLZFQc3C+2+bUvgsG9vJDsQ3jwFaGDn
 cryfRY9WJXxgcXqk1ClOnk9U9PGzRc48gdLVLhYuLsIvUWN7RzgRlBMsH33Gq9M=
 =kjvX
 -----END PGP SIGNATURE-----

Merge tag 'stable/for-linus-3.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

Pull xen fixes from Konrad Rzeszutek Wilk:
 - fix to Kconfig to make it fit within 80 line characters,
 - two bootup fixes (AMD 8-core and with PCI BIOS),
 - cleanup code in a Xen PV fb driver,
 - and a crash fix when trying to see non-existent PTE's

* tag 'stable/for-linus-3.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/Kconfig: fix Kconfig layout
  xen/pci: don't use PCI BIOS service for configuration space accesses
  xen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs
  xen/apic: Return the APIC ID (and version) for CPU 0.
  drivers/video/xen-fbfront.c: add missing cleanup code
2012-05-08 11:07:29 -07:00
Linus Torvalds e9b19cd43f Merge branch 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Pull two percpu fixes from Tejun Heo:
 "One adds missing KERN_CONT on split printk()s and the other makes
  the percpu allocator avoid using PMD_SIZE as atom_size on x86_32.

  Using PMD_SIZE led to vmalloc area exhaustion on certain
  configurations (x86_32 android) and the only cost of using PAGE_SIZE
  instead is static percpu area not being aligned to large page
  mapping."

* 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit
  percpu: use KERN_CONT in pcpu_dump_alloc_info()
2012-05-08 11:06:07 -07:00
Linus Torvalds 301cdf5c75 Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM fixes from Russell King:
 "This is mainly audit fixes, found by folks who happened to enable this
  feature and then found it broke their user applications."

* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
  ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd
  ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness
  ARM: 7411/1: audit: fix treatment of saved ip register during syscall tracing
  ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve
2012-05-08 11:05:05 -07:00
Tejun Heo d5e28005a1 percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit
With the embed percpu first chunk allocator, x86 uses either PAGE_SIZE
or PMD_SIZE for atom_size.  PMD_SIZE is used when CPU supports PSE so
that percpu areas are aligned to PMD mappings and possibly allow using
PMD mappings in vmalloc areas in the future.  Using larger atom_size
doesn't waste actual memory; however, it does require larger vmalloc
space allocation later on for !first chunks.

With reasonably sized vmalloc area, PMD_SIZE shouldn't be a problem
but x86_32 at this point is anything but reasonable in terms of
address space and using larger atom_size reportedly leads to frequent
percpu allocation failures on certain setups.

As there is no reason to not use PMD_SIZE on x86_64 as vmalloc space
is aplenty and most x86_64 configurations support PSE, fix the issue
by always using PMD_SIZE on x86_64 and PAGE_SIZE on x86_32.

v2: drop cpu_has_pse test and make x86_64 always use PMD_SIZE and
    x86_32 PAGE_SIZE as suggested by hpa.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Yanmin Zhang <yanmin.zhang@intel.com>
Reported-by: ShuoX Liu <shuox.liu@intel.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <4F97BA98.6010001@intel.com>
Cc: stable@vger.kernel.org
2012-05-08 09:42:18 -07:00
David Gibson de6c0b02d4 KVM: PPC: Book3S HV: Fix refcounting of hugepages
The H_REGISTER_VPA hcall implementation in HV Power KVM needs to pin some
guest memory pages into host memory so that they can be safely accessed
from usermode.  It does this used get_user_pages_fast().  When the VPA is
unregistered, or the VCPUs are cleaned up, these pages are released using
put_page().

However, the get_user_pages() is invoked on the specific memory are of the
VPA which could lie within hugepages.  In case the pinned page is huge,
we explicitly find the head page of the compound page before calling
put_page() on it.

At least with the latest kernel, this is not correct.  put_page() already
handles finding the correct head page of a compound, and also deals with
various counts on the individual tail page which are important for
transparent huge pages.  We don't support transparent hugepages on Power,
but even so, bypassing this count maintenance can lead (when the VM ends)
to a hugepage being released back to the pool with a non-zero mapcount on
one of the tail pages.  This can then lead to a bad_page() when the page
is released from the hugepage pool.

This removes the explicit compound_head() call to correct this bug.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-05-08 17:54:08 +03:00
Andrew Morton 1fd1443229 xen/Kconfig: fix Kconfig layout
Fit it into 80 columns so that it is readable in menuconfig.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-05-07 12:26:28 -04:00
David Vrabel 76a8df7b49 xen/pci: don't use PCI BIOS service for configuration space accesses
The accessing PCI configuration space with the PCI BIOS32 service does
not work in PV guests.

On systems without MMCONFIG or where the BIOS hasn't marked the
MMCONFIG region as reserved in the e820 map, the BIOS service is
probed (even though direct access is preferred) and this hangs.

CC: stable@kernel.org
Acked-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[v1: Fixed compile error when CONFIG_PCI is not set]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-05-07 12:16:21 -04:00
Konrad Rzeszutek Wilk b7e5ffe5d8 xen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs
If I try to do "cat /sys/kernel/debug/kernel_page_tables"
I end up with:

BUG: unable to handle kernel paging request at ffffc7fffffff000
IP: [<ffffffff8106aa51>] ptdump_show+0x221/0x480
PGD 0
Oops: 0000 [#1] SMP
CPU 0
.. snip..
RAX: 0000000000000000 RBX: ffffc00000000fff RCX: 0000000000000000
RDX: 0000800000000000 RSI: 0000000000000000 RDI: ffffc7fffffff000

which is due to the fact we are trying to access a PFN that is not
accessible to us. The reason (at least in this case) was that
PGD[256] is set to __HYPERVISOR_VIRT_START which was setup (by the
hypervisor) to point to a read-only linear map of the MFN->PFN array.
During our parsing we would get the MFN (a valid one), try to look
it up in the MFN->PFN tree and find it invalid and return ~0 as PFN.
Then pte_mfn_to_pfn would happilly feed that in, attach the flags
and return it back to the caller. 'ptdump_show' bitshifts it and
gets and invalid value that it tries to dereference.

Instead of doing all of that, we detect the ~0 case and just
return !_PAGE_PRESENT.

This bug has been in existence .. at least until 2.6.37 (yikes!)

CC: stable@kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-05-07 10:21:13 -04:00
Konrad Rzeszutek Wilk 558daa289a xen/apic: Return the APIC ID (and version) for CPU 0.
On x86_64 on AMD machines where the first APIC_ID is not zero, we get:

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x10] enabled)
BIOS bug: APIC version is 0 for CPU 1/0x10, fixing up to 0x10
BIOS bug: APIC version mismatch, boot CPU: 0, CPU 1: version 10

which means that when the ACPI processor driver loads and
tries to parse the _Pxx states it fails to do as, as it
ends up calling acpi_get_cpuid which does this:

for_each_possible_cpu(i) {
        if (cpu_physical_id(i) == apic_id)
                return i;
}

And the bootup CPU, has not been found so it fails and returns -1
for the first CPU - which then subsequently in the loop that
"acpi_processor_get_info" does results in returning an error, which
means that "acpi_processor_add" failing and per_cpu(processor)
is never set (and is NULL).

That means that when xen-acpi-processor tries to load (much much
later on) and parse the P-states it gets -ENODEV from
acpi_processor_register_performance() (which tries to read
the per_cpu(processor)) and fails to parse the data.

Reported-by-and-Tested-by:  Stefan Bader <stefan.bader@canonical.com>
Suggested-by:  Boris Ostrovsky <boris.ostrovsky@amd.com>
[v2: Bit-shift APIC ID by 24 bits]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-05-07 10:18:47 -04:00
Mark Brown 968c2c1707 regulator: Actually free the regulator in devm_regulator_put()
It turns out that (quite surprisingly) devres_destroy() only undoes the
devres mapping, it doesn't destroy the underlying resource, meaning that
anything using devm_regulator_put() would leak. While we wait for the new
devres_release() which does what we want to get merged open code it in
devm_regulator_put().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-05-07 13:14:44 +01:00
Julia Lawall a7a97c6394 drivers/video/xen-fbfront.c: add missing cleanup code
The operations in the subsequent error-handling code appear to be also
useful here.

Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[v1: Collapse some of the error handling functions]
[v2: Fix compile warning]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-05-07 06:41:56 -04:00
Ben Skeggs ec9b3a9de6 drm/nouveau/i2c: resume use of i2c-algo-bit, rather than custom stack
Previous issues with i2c-algo-bit have now been resolved.

This is a revert of f553b79c03 mostly,
due to fixes in the i2c core repairing the original issue, this code
isn't required and was causing regressions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reported-by: Nick Bowler <nbowler@elliptictech.com>
Tested-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-07 11:02:38 +01:00
Dave Airlie c42b5da2f0 Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes
Daniel wrote:

2 little patches:
- One regression fix to disable sdvo hotplug on broken hw.
- One patch to upconvert the snb hang workaround from patch v1 to patch
 v2.

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+
  drm/i915: disable sdvo hotplug on i945g/gm
2012-05-07 11:00:39 +01:00
Daniel Vetter 2e7a44814d drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+
I've flagged this while reviewing the first version and Ken Graunke
fixed it up in v2, but unfortunately Dave Airlie picked up the wrong
version.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: stable@kernel.org
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-07 10:37:56 +02:00
Daniel Vetter 768b107e4b drm/i915: disable sdvo hotplug on i945g/gm
Chris Wilson dug out a hw erratum saying that there's noise on the
interrupt line on i945G chips. We also have a bug report from a i945GM
chip with an sdvo hotplug interrupt storm (and no apparent cause).

Play it safe and disable sdvo hotplug on all i945 variants.

Note that this is a regression that has been introduced in 3.1,
when we've enabled sdvo hotplug support with

commit cc68c81aed
Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Date:   Wed Sep 21 17:13:30 2011 +0100

    drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI

Cc: stable@kernel.org
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=38442
Reported-and-tested-by: Dominik Köppl <dominik@devwork.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-07 10:37:56 +02:00
Larry Finger febb72a6e4 IA32 emulation: Fix build problem for modular ia32 a.out support
Commit ce7e5d2d19 ("x86: fix broken TASK_SIZE for ia32_aout") breaks
kernel builds when "CONFIG_IA32_AOUT=m" with

  ERROR: "set_personality_ia32" [arch/x86/ia32/ia32_aout.ko] undefined!
  make[1]: *** [__modpost] Error 1

The entry point needs to be exported.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Al Viro <viro@zeniv.linux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-06 18:26:20 -07:00
Linus Torvalds d48b97b403 Linux 3.4-rc6 2012-05-06 15:07:32 -07:00
Linus Torvalds 18b15fcde7 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes form Peter Anvin

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  intel_mid_powerbtn: mark irq as IRQF_NO_SUSPEND
  arch/x86/platform/geode/net5501.c: change active_low to 0 for LED driver
  x86, relocs: Remove an unused variable
  asm-generic: Use __BITS_PER_LONG in statfs.h
  x86/amd: Re-enable CPU topology extensions in case BIOS has disabled it
2012-05-06 12:19:38 -07:00
Linus Torvalds 271fd5d728 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
 "The big ones here are a memory leak we introduced in rc1, and a
  scheduling while atomic if the transid on disk doesn't match the
  transid we expected.  This happens for corrupt blocks, or out of date
  disks.

  It also fixes up the ioctl definition for our ioctl to resolve logical
  inode numbers.  The __u32 was a merging error and doesn't match what
  we ship in the progs."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: avoid sleeping in verify_parent_transid while atomic
  Btrfs: fix crash in scrub repair code when device is missing
  btrfs: Fix mismatching struct members in ioctl.h
  Btrfs: fix page leak when allocing extent buffers
  Btrfs: Add properly locking around add_root_to_dirty_list
2012-05-06 10:20:07 -07:00
Al Viro ce7e5d2d19 x86: fix broken TASK_SIZE for ia32_aout
Setting TIF_IA32 in load_aout_binary() used to be enough; these days
TASK_SIZE is controlled by TIF_ADDR32 and that one doesn't get set
there.  Switch to use of set_personality_ia32()...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-06 10:15:18 -07:00
Gleb Natapov 62c49cc976 KVM: Do not take reference to mm during async #PF
It turned to be totally unneeded. The reason the code was introduced is
so that KVM can prefault swapped in page, but prefault can fail even
if mm is pinned since page table can change anyway. KVM handles this
situation correctly though and does not inject spurious page faults.

Fixes:
 "INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected" warning while
 running LTP inside a KVM guest using the recent -next kernel.

Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-05-06 15:00:02 +03:00
Gleb Natapov a4fa163531 KVM: ensure async PF event wakes up vcpu from halt
If vcpu executes hlt instruction while async PF is waiting to be delivered
vcpu can block and deliver async PF only after another even wakes it
up. This happens because kvm_check_async_pf_completion() will remove
completion event from vcpu->async_pf.done before entering kvm_vcpu_block()
and this will make kvm_arch_vcpu_runnable() return false. The solution
is to make vcpu runnable when processing completion.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-05-06 14:56:54 +03:00
Chris Mason b9fab919b7 Btrfs: avoid sleeping in verify_parent_transid while atomic
verify_parent_transid needs to lock the extent range to make
sure no IO is underway, and so it can safely clear the
uptodate bits if our checks fail.

But, a few callers are using it with spinlocks held.  Most
of the time, the generation numbers are going to match, and
we don't want to switch to a blocking lock just for the error
case.  This adds an atomic flag to verify_parent_transid,
and changes it to return EAGAIN if it needs to block to
properly verifiy things.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2012-05-06 07:23:47 -04:00
Colin Cross fde165b2a2 ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd
Commit 4e8ee7de22 (ARM: SMP: use
idmap_pgd for mapping MMU enable during secondary booting)
switched secondary boot to use idmap_pgd, which is initialized
during early_initcall, instead of a page table initialized during
__cpu_up.  This causes idmap_pgd to contain the static mappings
but be missing all dynamic mappings.

If a console is registered that creates a dynamic mapping, the
printk in secondary_start_kernel will trigger a data abort on
the missing mapping before the exception handlers have been
initialized, leading to a hang.  Initial boot is not affected
because no consoles have been registered, and resume is usually
not affected because the offending console is suspended.
Onlining a cpu with hotplug triggers the problem.

A workaround is to the printk in secondary_start_kernel until
after the page tables have been switched back to init_mm.

Cc: <stable@vger.kernel.org>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-05-06 11:10:41 +01:00
Linus Torvalds 03cb00b3c7 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha
Pull alpha fixes from Matt Turner:
 "My alpha tree is back up (after taking quite some time to get my GPG
  key signed).  It contains just some simple fixes."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha:
  alpha: silence 'const' warning in sys_marvel.c
  alpha: include module.h to fix modpost on Tsunami
  alpha: properly define get/set_rtc_time on Marvel/SMP
  alpha: VGA_HOSE depends on VGA_CONSOLE
2012-05-05 16:34:38 -07:00
Jiri Slaby 49a5f3cf6a TTY: pdc_cons, fix regression in close
The test in pdc_console_tty_close '!tty->count' was always wrong
because tty->count is decremented after tty->ops->close is called and
thus can never be zero. Hence the 'then' branch was never executed and
the timer never deleted.

This did not matter until commit 5dd5bc40f3 ("TTY: pdc_cons, use
tty_port").  There we needed to set TTY in tty_port to NULL, but this
never happened due to the bug above.

So change the test to really trigger at the last close by changing the
condition to 'tty->count == 1'.

Well, the driver should not touch tty->count at all.  It should use
tty_port->count and count open count there itself.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-and-tested-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-05 16:21:21 -07:00
Linus Torvalds 1c2f954806 sound fixes for 3.4-rc6
As good as nothing exciting here; just a few trivial fixes for
 various ASoC stuff.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPpRa+AAoJEGwxgFQ9KSmkM4sP/jsd/scLYP3T1tu1pqiU6zyZ
 qNDu8ghU3AVuGe3qxAVb8AjrXALyqkqg1GXHY66R+Q/BmgtjOfTNyNV+ypGRuGif
 TJcLqWim0CVASZRFGkg/C9fEmeN5CDKcmZF7B53nAL2PRzm2/OrNhVBBKFc9bcbI
 S73pRGg+MoHbA3OrroZnBIA4dyG3+K+p2h9VlXUj1gdxu5+uzoiZwSbu/nGdLi/W
 5CCw9VceFi7sRkjBHuFL9grCgGASP5T89O6+lUH79JVnFdLXV63zpQt+zc6JUM8e
 mvosfcJZ6uln6aG+ACA0xgEwExImLLXiPl0BScIJo+HmwGoCbPIS06lBmjLBac1p
 78CYNYfhV3AzWCKbmMZXMEiu3g1O33N9UuOxKvnH02TH5b8B6OUdTFkf6JUA32Zw
 wtCe4yT48zJ+Iu5+YU/7dvDrtUdMVQ7ogSUyMnKFee+uh5a5I5r1T7ybJ8igF/qe
 2YqhpeUW4AEFA9VlPxVP4itVVQK8V0GL1+N0ny5COoT8ldImqqjCCpCJRdljCHDr
 xTK5n0FVZBP0hh2MwJZDNOwtNV2fKrA3vPJYjFhNfhzj+Sha9rxDXg4KnW5PA2P2
 H6I88vETSsrer5JlOzGp7myzdzrqb5gpMKTuWKpjxbCl3aihN16NiKQa8NzizSzg
 ZQldGV1KrK6GNFOkoSeQ
 =ZPkR
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound sound fixes from Takashi Iwai:
 "As good as nothing exciting here; just a few trivial fixes for various
  ASoC stuff."

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: omap-pcm: Free dma buffers in case of error.
  ASoC: s3c2412-i2s: Fix dai registration
  ASoC: wm8350: Don't use locally allocated codec struct
  ASoC: tlv312aic23: unbreak resume
  ASoC: bf5xx-ssm2602: Set DAI format
  ASoC: core: check of_property_count_strings failure
  ASoC: dt: sgtl5000.txt: Add description for 'reg' field
  ASoC: wm_hubs: Make sure we don't disable differential line outputs
2012-05-05 10:07:06 -07:00
Linus Torvalds 59068e369b Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull an ACPI patch from Len Brown:
 "It fixes a D3 issue new in 3.4-rc1."

By Lin Ming via Len Brown:
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  ACPI: Fix D3hot v D3cold confusion
2012-05-05 10:06:06 -07:00
Sasha Levin 377485f624 init: don't try mounting device as nfs root unless type fully matches
Currently, we'll try mounting any device who's major device number is
UNNAMED_MAJOR as NFS root.  This would happen for non-NFS devices as
well (such as 9p devices) but it wouldn't cause any issues since
mounting the device as NFS would fail quickly and the code proceeded to
doing the proper mount:

       [  101.522716] VFS: Unable to mount root fs via NFS, trying floppy.
       [  101.534499] VFS: Mounted root (9p filesystem) on device 0:18.

Commit 6829a048102a ("NFS: Retry mounting NFSROOT") introduced retries
when mounting NFS root, which means that now we don't immediately fail
and instead it takes an additional 90+ seconds until we stop retrying,
which has revealed the issue this patch fixes.

This meant that it would take an additional 90 seconds to boot when
we're not using a device type which gets detected in order before NFS.

This patch modifies the NFS type check to require device type to be
'Root_NFS' instead of requiring the device to have an UNNAMED_MAJOR
major.  This makes boot process cleaner since we now won't go through
the NFS mounting code at all when the device isn't an NFS root
("/dev/nfs").

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-05 10:04:40 -07:00
Will Deacon 2f97836698 ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness
The machine endianness has no direct correspondence to the syscall ABI,
so use only AUDIT_ARCH_ARM when identifying the ABI to the audit tools
in userspace.

Cc: stable@vger.kernel.org
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-05-05 13:54:01 +01:00