Commit Graph

362767 Commits

Author SHA1 Message Date
Richard Kuo
3981c4728b Hexagon: fix up int enable/disable at ret_from_fork
Check return coming out of check_work_pending, and if copy_thread
passed us a function in r24, call it.  Based on feedback from Al
Viro.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:26 -05:00
Richard Kuo
1ce81f4f87 Hexagon: add IOMEM and _relaxed IO macros
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:25 -05:00
Richard Kuo
f167063a0c Hexagon: switch to using the device type for IO mappings
Uncached on our architecture can still have side effects
such as canceled/replayed transactions; device type prevents
this.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:25 -05:00
Richard Kuo
2b3c744c3b Hexagon: don't print info for offline CPU's
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:25 -05:00
Richard Kuo
7777746c40 Hexagon: add support for single-stepping (v4+)
Hardware single-step is only available on v4 and later
architectures.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:25 -05:00
Richard Kuo
f8722a4d52 Hexagon: use correct work mask when checking for more work
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:24 -05:00
Richard Kuo
db0fe532db Hexagon: add support for additional exceptions
Add multi-reg-write and unaligned-PC exceptions.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:24 -05:00
Richard Kuo
20f704b69a Hexagon: fix initial page table setup prior to jump to VA
Use the exact number of pages needed to be mapped pre-VA-jump,
then map 896MB afterwards, which the arch mem init will fix up.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:24 -05:00
Richard Kuo
0357d2f2a8 Hexagon: remove keyring related call
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:24 -05:00
Richard Kuo
9cdae82d14 Hexagon: check to if we will overflow the signal stack
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:24 -05:00
Richard Kuo
a11e67c261 Hexagon: Signal and return path fixes
This fixes the return value of sigreturn and moves the work pending check
into a c routine for readability and fixes the loop for multiple pending
signals.  Based on feedback from Al Viro.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:24 -05:00
Richard Kuo
60c4ba99e0 Hexagon: add support for new v4+ registers
Add support for a couple new v4+ registers, along with
newer save/restore pt_regs.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:23 -05:00
Richard Kuo
444dd742d3 Hexagon: add individual register access for switch_stack
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:23 -05:00
Richard Kuo
e470d932ce Hexagon: use defines for MIN_KERNEL_SEG calculation
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:23 -05:00
Richard Kuo
53debcd518 Hexagon: use GENERIC_CPU_DEVICES
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:22 -05:00
Richard Kuo
66b03dbfe6 Hexagon: change arch version config to allow comparisons
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:22 -05:00
Richard Kuo
8f5a0b9dff Hexagon: add support for ARCH_PFN_OFFSET
Add support for loading the kernel at a physical offset.  The
offset should still be 4M aligned.

Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:22 -05:00
Richard Kuo
e0025a72c3 Hexagon: fix __atomic_add_unless
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:22 -05:00
Richard Kuo
22493cfd78 Hexagon: clean up generic headers in Kbuild
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
2013-04-30 19:40:22 -05:00
Linus Torvalds
c1be5a5b1b Linux 3.9 2013-04-28 17:36:01 -07:00
Linus Torvalds
4cbbd1d55d ARM: arm-soc fixes for 3.9
A late-arriving fix for musb on OMAP4, resolving an issue where the musb
 IP won't be clocked and thus not functional. Small in scope, most of the
 lines changed is a longish comment.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRfDlOAAoJEIwa5zzehBx3DQAQAJ/paiDUJBvjXc+UmoZm1L3X
 mjBBNdGTJgN8MKnnQrDdPjjYalht42Avu3UXFJMggpETVbYD0IOApv/lvhj+BVbL
 sdDDJ9+xr5ojz8h80yU+7lsflqbvJVaPVDdVVpfSHysXEWjnfggblF8HrFNOgLaB
 q1BwnvEIs7kwCb1icUrUL0/NIAEFRHDACkssoME0QMLyfvE+L8kvgqiD61/i1LCL
 70Vy73VkMzLevJlcI9AMPhip0D8HxNUGQZbwhN/6qcX+GiFY8IeVVru4i3ux261B
 RlRrM8UOh6gHtmjzd8f8YOg4IG5ys4YEB9T7La2riEin91aay2ID1lGfaPlj5jZl
 Y9HGpSO+CcbminBdnpPQR91iI5qpB3WXtkOoISr2f9kOPLofmk7SsK8lIfVBzqhD
 HzalNoZfeFlfT64Zg2nK+ocIZSvCLr6YfcNs22jD1KfxYRMehJ3J8u620TDWZKRI
 iW3SVVi4XDWvX7g7Ja6Grbs/d/LBOrTgnzDJGbrkgcC0sAovnLVmVP2XoQQdKX7M
 z+qhJPbKwQZcnDzNp7VTwZwkt0ph7anxLxDGm6rNTgU/C3ECq59WmRL9UwLdakqu
 6gnix3NyQ3V9x1DVp0OsDnDARJ/jq4qPg7tbv0eZtEVjYjNPa0OXidRGK6yIyCGo
 puAufO6bkpFFZj8/Wfz3
 =pHY5
 -----END PGP SIGNATURE-----

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

Pull ARM SoC fix from Olof Johansson:
 "A late-arriving fix for musb on OMAP4, resolving an issue where the
  musb IP won't be clocked and thus not functional.  Small in scope,
  most of the lines changed is a longish comment."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: OMAP4: hwmod data: make 'ocp2scp_usb_phy_phy_48m" as the main clock
2013-04-27 13:58:36 -07:00
Linus Torvalds
3c0b9de6d3 vm: add no-mmu vm_iomap_memory() stub
I think we could just move the full vm_iomap_memory() function into
util.h or similar, but I didn't get any reply from anybody actually
using nommu even to this trivial patch, so I'm not going to touch it any
more than required.

Here's the fairly minimal stub to make the nommu case at least
potentially work.  It doesn't seem like anybody cares, though.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-27 13:25:38 -07:00
Linus Torvalds
e09d13c4c8 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fix from Ingo Molnar:
 "This fix adds missing RCU read protection"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  events: Protect access via task_subsys_state_check()
2013-04-27 10:08:09 -07:00
Olof Johansson
d21be237ff One MUSB regression fix that I forgot to send earlier. Without
this MUSB no longer works on omap4 based devices.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRdv6TAAoJEBvUPslcq6VzgtcP/jTfSTszSv0vkxivkeyvWN31
 59TSAOTOgTxLS2MIncHhq61pAcvCe9xuM2a3tjrEB4KqOyOS+xcahD3RdVgSI75y
 FmHGWC22d5jjza07OM4NbAXIUJ6xvTAPaLaNPeQ/hu1+p7MAaJdDVtz4crHgSRqs
 8LMQeZE1j/B51xnBXuJ05sv+7uOZ63w47+mGlUDsGxpuOBYVfj1lN/305yvK5iWP
 HNArH/5L0AgQSN50A6Ra+mGdC1PfzD6vStxtjWSftJp37J+ti504gvOzeCcSmYXz
 oOJNp9nKcH8KuBFbY5pclevaadQKvPq5Prl0GIklf7df5bqQSHycagCsN76iRT5N
 HawOGuzImFPn5IVeEWJBbBS5E7MK96WBOpHWCGmzKcgaLBAwwG4gJz8OYwyW+ofr
 X3bhRKKd8DJjmFJV92ItGC/EncL5gOTbJsFQ4/DZoCwMtDA1A+rd2FIQf5rhGUe+
 TLpQu0XKRs/abRXmSF+TRAI64evBTjSa8SMysSUBU5ptPFeZlRAhC3fiPV/NUvHD
 gUGX5NUbLJ50Jk3B9EAinclPjK+PkoPLmrvTdyV+Fno8BHq5YLYpZHRg1qzvxrlo
 JkluCnWYEZL7s331KjTME9BliLHbOQQw1kF/YSnecOktbI+N9u9t2eHnRgSjasBd
 dSir3/pyCcKym5keyycW
 =MBEd
 -----END PGP SIGNATURE-----

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

From Tony Lindgren:
One MUSB regression fix that I forgot to send earlier. Without
this MUSB no longer works on omap4 based devices.

* tag 'omap-for-v3.9-rc6/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4: hwmod data: make 'ocp2scp_usb_phy_phy_48m" as the main clock

Signed-off-by: Olof Johansson <olof@lixom.net>
2013-04-26 17:35:21 -07:00
Linus Torvalds
d7d7271f42 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
 "Two driver fixes.

  One avoids reading any file at a system with a cx25821 board
  (fortunately, this is not a common device).  The other one prevents
  reading after a buffer with ISDB-T devices based on mb86a20s."

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] cx25821: do not expose broken video output streams
  [media] mb86a20s: Fix estimate_rate setting
2013-04-26 08:17:07 -07:00
Linus Torvalds
96edcf31b3 Merge branch 'fixes-3.9-late' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull late parisc fixes from Helge Deller:
 "I know it's *very* late in the 3.9 release cycle, but since there
  aren't that many people testing the parisc linux kernel, a few (for
  our port) critical issues just showed up a few days back for the first
  time.

  What's in it?
   - add missing __ucmpdi2 symbol, which is required for btrfs on 32bit
     kernel.
   - change kunmap() macro to static inline function.  This fixes a
     debian/gcc-4.4 build error.
   - add locking when doing PTE updates.  This fixes random userspace
     crashes.
   - disable (optional) -mlong-calls compiler option for modules, else
     modules can't be loaded at runtime.
   - a smart patch by Will Deacon which fixes 64bit put_user() warnings
     on 32bit kernel."

* 'fixes-3.9-late' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates
  parisc: disable -mlong-calls compiler option for kernel modules
  parisc: uaccess: fix compiler warnings caused by __put_user casting
  parisc: Change kunmap macro to static inline function
  parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds.
2013-04-26 08:05:01 -07:00
Matt Fleming
f464246d85 efivars: only check for duplicates on the registered list
variable_is_present() accesses '__efivars' directly, but when called via
gsmi_init() Michel reports observing the following crash,

  BUG: unable to handle kernel NULL pointer dereference at (null)
  IP: variable_is_present+0x55/0x170
  Call Trace:
    register_efivars+0x106/0x370
    gsmi_init+0x2ad/0x3da
    do_one_initcall+0x3f/0x170

The reason for the crash is that '__efivars' hasn't been initialised nor
has it been registered with register_efivars() by the time the google
EFI SMI driver runs.  The gsmi code uses its own struct efivars, and
therefore, a different variable list.  Fix the above crash by passing
the registered struct efivars to variable_is_present(), so that we
traverse the correct list.

Reported-by: Michel Lespinasse <walken@google.com>
Tested-by: Michel Lespinasse <walken@google.com>
Cc: Mike Waychison <mikew@google.com>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-26 08:02:03 -07:00
Jiri Slaby
37b7f3c765 TTY: fix atime/mtime regression
In commit b0de59b573 ("TTY: do not update atime/mtime on read/write")
we removed timestamps from tty inodes to fix a security issue and waited
if something breaks.  Well, 'w', the utility to find out logged users
and their inactivity time broke.  It shows that users are inactive since
the time they logged in.

To revert to the old behaviour while still preventing attackers to
guess the password length, we update the timestamps in one-minute
intervals by this patch.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-26 07:59:23 -07:00
Zhao Hongjiang
91d80a84bb aio: fix possible invalid memory access when DEBUG is enabled
dprintk() shouldn't access @ring after it's unmapped.

Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-26 07:56:18 -07:00
H. Peter Anvin
697dfd8844 * The EFI variable anti-bricking algorithm merged in -rc8 broke booting
on some Apple machines because they implement EFI spec 1.10, which
    doesn't provide a QueryVariableInfo() runtime function and the logic
    used to check for the existence of that function was insufficient.
    Fix from Josh Boyer.
 
  * The anti-bricking algorithm also introduced a compiler warning on
    32-bit. Fix from Borislav Petkov.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJReOtLAAoJEC84WcCNIz1VFZgP/Aws1NdPo/RdyI6/oGkI7ZV4
 +5O79pLcaJt7ESuWjx2/9pto/qTzsWMri40HZivGbgxw+ViEdprGjJUFqSTn1LyJ
 QrYamP40jBdLFfh1oDHvsub8HiC72sjB/ILSoDvooHEniDmajrL6zZK7C66gP+na
 Q4ZN/Jp3x3XAW0s1mVJC4VnL60489Q/ndR3SH01hr2gqMSvmjwnhfiio6n9gYvdd
 egmoalTIst94+X0nW1VHA4HT3SRM7cuwCA/kDxtG6qitbsQMUKUoa+DOpMNfE8mD
 QdzmzZL115O+7ORj8Ki/JNS2CSyI83IRSQ3kcM1J5026mWIBMiM3h9Vlu5NwAyFA
 bapZSaYr7S5u9BU/vICGnpyYnSsLfjuB3CnAuJFyM0YVFjR6n7moUpnP1LNifGHX
 E/Qr1HDyIwwxE8K0f/n86a7BfstoMjzE74an6wOVXKDUY/RnH+FdWG/HDBPd8iG4
 Avei1bK2zLLcXK4Kqmx8EkXTK7VSFx6StCPjAVlpgYOAMpRmQEmNpd/3lF7Y70gp
 yXIBTSTKaPZ+/5SaeOPL2sgW37Uo9fFMphww2mLXGIdgO3L0BHD5hIq9pZQ7g0VK
 noDN7f6ViCuNYuZIrTAtLo9Oc+KKgqOXa0TovUhORkJ8Gk93moL4fgYyFVPvsYnD
 rQuTRJ3pZEEHlCmyZzBl
 =l/fT
 -----END PGP SIGNATURE-----

Merge tag 'efi-urgent' into x86/urgent

 * The EFI variable anti-bricking algorithm merged in -rc8 broke booting
   on some Apple machines because they implement EFI spec 1.10, which
   doesn't provide a QueryVariableInfo() runtime function and the logic
   used to check for the existence of that function was insufficient.
   Fix from Josh Boyer.

 * The anti-bricking algorithm also introduced a compiler warning on
   32-bit. Fix from Borislav Petkov.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-04-25 14:00:22 -07:00
John David Anglin
bda079d336 parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates
User applications running on SMP kernels have long suffered from instability
and random segmentation faults.  This patch improves the situation although
there is more work to be done.

One of the problems is the various routines in pgtable.h that update page table
entries use different locking mechanisms, or no lock at all (set_pte_at).  This
change modifies the routines to all use the same lock pa_dbit_lock.  This lock
is used for dirty bit updates in the interruption code. The patch also purges
the TLB entries associated with the PTE to ensure that inconsistent values are
not used after the page table entry is updated.  The UP and SMP code are now
identical.

The change also includes a minor update to the purge_tlb_entries function in
cache.c to improve its efficiency.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25 22:37:00 +02:00
Helge Deller
cf71130d63 parisc: disable -mlong-calls compiler option for kernel modules
CONFIG_MLONGCALLS was introduced in commit
ec758f9832 to overcome linker issues when linking
huge linux kernels, e.g. with many modules linked in.

But in the kernel module loader there is no support yet for the new relocation
types, which is why modules built with -mlong-calls can't be loaded.
Furthermore, for modules long calls are not really necessary, since we already
use stub sections which resolve long distance calls.

So, let's just disable this compiler option when compiling kernel modules.

Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25 22:36:50 +02:00
Will Deacon
0f28b62890 parisc: uaccess: fix compiler warnings caused by __put_user casting
When targetting 32-bit processors, __put_user emits a pair of stw
instructions for the 8-byte case. If the type of __val is a pointer, the
marshalling code casts it to the wider integer type of u64, resulting
in the following compiler warnings:

  kernel/signal.c: In function 'copy_siginfo_to_user':
  kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  [...]

This patch fixes the warnings by removing the marshalling code and using
the correct output modifiers in the __put_{user,kernel}_asm64 macros
so that GCC will allocate the right registers without the need to
extract the two words explicitly.

Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25 22:36:42 +02:00
John David Anglin
87be2f88b2 parisc: Change kunmap macro to static inline function
Change kunmap macro to static inline function to fix build error
compiling drivers/base/dma-buf.c.

Without the change, the following error can occur:

   CC      drivers/base/dma-buf.o
drivers/base/dma-buf.c: In function 'dma_buf_kunmap':
drivers/base/dma-buf.c:427:46:
error: macro "kunmap" passed 3 arguments, but takes just 1

I believe parisc is the only arch to implement kunmap using a macro.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25 22:36:31 +02:00
John David Anglin
ca0ad83da1 parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds.
The Debian experimental linux source package (3.8.5-1) build fails
with the following errors:
...
MODPOST 2016 modules
ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
ERROR: "__ucmpdi2" [drivers/md/dm-verity.ko] undefined!

The attached patch resolves this problem.  It is based on the s390
implementation of ucmpdi2.c.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25 22:36:15 +02:00
Linus Torvalds
0fbd06761f Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fix from David Miller:
 "Brown paper bag fix for sparc64"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix missing put_cpu_var() in tlb_batch_add_one() when not batching.
2013-04-24 17:10:18 -07:00
Linus Torvalds
3c71d03a28 This is a last minute revert for the GPIO tree, as Mike
Dunn noticed breakage on some older PXA machines due to
 moving PXA GPIO initcalls to the module_init initlevel.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQIcBAABAgAGBQJReDYJAAoJEEEQszewGV1zdRgQAIz5wY86KH8Pdnykbfemf//i
 KkGa+qTYDZ5l5yXjGVVzmIXju0Wi6GQr72CJlN+4VdhIbZpSKRn0YwPJ+iij8jkx
 CbzxEBFIqRqqEfPeVTLwN2fhcTpmGWVSA8bFF0Rnrd7tmVbz5M4HKYOy2w5/B/g9
 PraJ+3FZb3BfJCsaT00WklhyCgTsGDTIF2b4Vu11SMU1KSh4AX4sOb4P8kBJ7e68
 GXMuvdQ2+zsOSQ4UXxxLSDjoR8iTmn+HZ567GqCmOOd5BBB1fZIRPDKI5U4fHUw5
 tTUvECp49wXJgctmiMkU7rHEajAWHp7/xlxFEH/fJiwDgyzFQsSzM6JR7GJa7zOF
 8B4/riIOjzIhxsmktHNYhEdZx7OmrBhs4Kj6LE7eudRqPGSKSjieshKtgeetvVbz
 P92DT14qpJhZxU2HTf22gDGKWmtgaRnaQOp6gXy5WrpC9xsxb8Xp+ueivT3pqaSk
 +yEn8/PYN3tLIVfbfpv1qA9tfch4VJG4VCP7at41/XGwKjReJjCdnxp3lyP4wMwP
 BA5u9dzVWQtMEYEj1BrFYebjxkXy0rcte2xjLiW7rc8xfHuwY3zKrbrg+tDFJUdh
 ScmdcYy2wrTGxRnh1aO4f6SWAXq625qqiL+LOEgMlYIAetfZbLx1wud+zpg937fA
 PiRpxNcN1vN4plY467qf
 =Xxmm
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v3.9-lastminute' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull gpi fix from Linus Walleij:
 "This is a last minute revert for the GPIO tree, as Mike Dunn noticed
  breakage on some older PXA machines due to moving PXA GPIO initcalls
  to the module_init initlevel"

* tag 'gpio-v3.9-lastminute' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  Revert "gpio: pxa: set initcall level to module init"
2013-04-24 17:01:58 -07:00
David S. Miller
f0af97070a sparc64: Fix missing put_cpu_var() in tlb_batch_add_one() when not batching.
Reported-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-24 16:52:18 -07:00
Linus Walleij
cf3fa17c20 Revert "gpio: pxa: set initcall level to module init"
This reverts commit 6c7e660a27.

The commit causes breakage on several older PXA machines.

Reported-by: Mike Dunn <mikedunn@newsguy.com>
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-04-24 21:42:24 +02:00
Josh Boyer
f697036b93 efi: Check EFI revision in setup_efi_vars
We need to check the runtime sys_table for the EFI version the firmware
specifies instead of just checking for a NULL QueryVariableInfo.  Older
implementations of EFI don't have QueryVariableInfo but the runtime is
a smaller structure, so the pointer to it may be pointing off into garbage.

This is apparently the case with several Apple firmwares that support EFI
1.10, and the current check causes them to no longer boot.  Fix based on
a suggestion from Matthew Garrett.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-04-24 16:19:01 +01:00
Borislav Petkov
51f8fbba64 x86, efi: Fix a build warning
Fix this:

arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_vars’:
arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ‘efi_call_phys’ makes pointer from integer without a cast [enabled by default]
In file included from arch/x86/boot/compressed/eboot.c:12:0:
/w/kernel/linux/arch/x86/include/asm/efi.h:8:33: note: expected ‘void *’ but argument is of type ‘long unsigned int’

after cc5a080c5d ("efi: Pass boot services variable info to runtime
code").

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-04-24 11:57:15 +01:00
Linus Torvalds
824282ca7d Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fix from Ralf Baechle:
 "Revert the change of the definition of PAGE_MASK which was prettier
  but broke a few relativly rare platforms"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  Revert "MIPS: page.h: Provide more readable definition for PAGE_MASK."
2013-04-22 15:00:59 -07:00
Ralf Baechle
3b5e50edaf Revert "MIPS: page.h: Provide more readable definition for PAGE_MASK."
This reverts commit c17a655478.

Manuel Lauss writes:

lmo commit c17a6554 (MIPS: page.h: Provide more readable definition for
PAGE_MASK) apparently breaks ioremap of 36-bit addresses on my Alchemy
systems (PCI and PCMCIA) The reason is that in arch/mips/mm/ioremap.c
line 157  (phys_addr &= PAGE_MASK) bits 32-35 are cut off.  Seems the
new PAGE_MASK is explicitly 32bit, or one could make it signed instead
of unsigned long.
2013-04-22 18:09:35 +02:00
Rusty Russell
f83b293366 kernel/hz.bc: ignore.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-22 07:09:06 -07:00
Linus Torvalds
7790ff45be Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu:
 "This fixes a kernel memory leak in the algif interface"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: algif - suppress sending source address information in recvmsg
2013-04-22 07:07:46 -07:00
Linus Torvalds
60d509fa6a Linux 3.9-rc8 2013-04-21 14:38:45 -07:00
Linus Torvalds
3125929454 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
 "Misc fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86: Fix offcore_rsp valid mask for SNB/IVB
  perf: Treat attr.config as u64 in perf_swevent_init()
2013-04-21 10:25:42 -07:00
Linus Torvalds
12c71c4b60 Merge branch 'vm_ioremap_memory-examples'
I'm going to do an -rc8, so I'm just going to do this rather than delay
it any further. They are arguably stable material anyway.

* vm_ioremap_memory-examples:
  mtdchar: remove no-longer-used vma helpers
  vm: convert snd_pcm_lib_mmap_iomem() to vm_iomap_memory() helper
  vm: convert fb_mmap to vm_iomap_memory() helper
  vm: convert mtdchar mmap to vm_iomap_memory() helper
  vm: convert HPET mmap to vm_iomap_memory() helper
2013-04-21 10:16:56 -07:00
Paul E. McKenney
c79aa0d965 events: Protect access via task_subsys_state_check()
The following RCU splat indicates lack of RCU protection:

[  953.267649] ===============================
[  953.267652] [ INFO: suspicious RCU usage. ]
[  953.267657] 3.9.0-0.rc6.git2.4.fc19.ppc64p7 #1 Not tainted
[  953.267661] -------------------------------
[  953.267664] include/linux/cgroup.h:534 suspicious rcu_dereference_check() usage!
[  953.267669]
[  953.267669] other info that might help us debug this:
[  953.267669]
[  953.267675]
[  953.267675] rcu_scheduler_active = 1, debug_locks = 0
[  953.267680] 1 lock held by glxgears/1289:
[  953.267683]  #0:  (&sig->cred_guard_mutex){+.+.+.}, at: [<c00000000027f884>] .prepare_bprm_creds+0x34/0xa0
[  953.267700]
[  953.267700] stack backtrace:
[  953.267704] Call Trace:
[  953.267709] [c0000001f0d1b6e0] [c000000000016e30] .show_stack+0x130/0x200 (unreliable)
[  953.267717] [c0000001f0d1b7b0] [c0000000001267f8] .lockdep_rcu_suspicious+0x138/0x180
[  953.267724] [c0000001f0d1b840] [c0000000001d43a4] .perf_event_comm+0x4c4/0x690
[  953.267731] [c0000001f0d1b950] [c00000000027f6e4] .set_task_comm+0x84/0x1f0
[  953.267737] [c0000001f0d1b9f0] [c000000000280414] .setup_new_exec+0x94/0x220
[  953.267744] [c0000001f0d1ba70] [c0000000002f665c] .load_elf_binary+0x58c/0x19b0
...

This commit therefore adds the required RCU read-side critical
section to perf_event_comm().

Reported-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
Cc: acme@ghostprotocols.net
Link: http://lkml.kernel.org/r/20130419190124.GA8638@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Gustavo Luiz Duarte <gusld@br.ibm.com>
2013-04-21 11:21:39 +02:00
Linus Torvalds
830ac8524f Merge branch 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull kdump fixes from Peter Anvin:
 "The kexec/kdump people have found several problems with the support
  for loading over 4 GiB that was introduced in this merge cycle.  This
  is partly due to a number of design problems inherent in the way the
  various pieces of kdump fit together (it is pretty horrifically manual
  in many places.)

  After a *lot* of iterations this is the patchset that was agreed upon,
  but of course it is now very late in the cycle.  However, because it
  changes both the syntax and semantics of the crashkernel option, it
  would be desirable to avoid a stable release with the broken
  interfaces."

I'm not happy with the timing, since originally the plan was to release
the final 3.9 tomorrow.  But apparently I'm doing an -rc8 instead...

* 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  kexec: use Crash kernel for Crash kernel low
  x86, kdump: Change crashkernel_high/low= to crashkernel=,high/low
  x86, kdump: Retore crashkernel= to allocate under 896M
  x86, kdump: Set crashkernel_low automatically
2013-04-20 18:40:36 -07:00