1
0
Fork 0
Commit Graph

348 Commits (1e18ac7aeaec357048172695b1fbb461205b166f)

Author SHA1 Message Date
Linus Torvalds ad90fb9751 Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block
Pull asm/scatterlist.h removal from Jens Axboe:
 "We don't have any specific arch scatterlist anymore, since parisc
  finally switched over.  Kill the include"

* 'for-4.2/sg' of git://git.kernel.dk/linux-block:
  remove scatterlist.h generation from arch Kbuild files
  remove <asm/scatterlist.h>
2015-06-25 15:22:36 -07:00
Laurent Dufour 2ae416b142 mm: new mm hook framework
CRIU is recreating the process memory layout by remapping the checkpointee
memory area on top of the current process (criu).  This includes remapping
the vDSO to the place it has at checkpoint time.

However some architectures like powerpc are keeping a reference to the
vDSO base address to build the signal return stack frame by calling the
vDSO sigreturn service.  So once the vDSO has been moved, this reference
is no more valid and the signal frame built later are not usable.

This patch serie is introducing a new mm hook framework, and a new
arch_remap hook which is called when mremap is done and the mm lock still
hold.  The next patch is adding the vDSO remap and unmap tracking to the
powerpc architecture.

This patch (of 3):

This patch introduces a new set of header file to manage mm hooks:
- per architecture empty header file (arch/x/include/asm/mm-arch-hooks.h)
- a generic header (include/linux/mm-arch-hooks.h)

The architecture which need to overwrite a hook as to redefine it in its
header file, while architecture which doesn't need have nothing to do.

The default hooks are defined in the generic header and are used in the
case the architecture is not defining it.

In a next step, mm hooks defined in include/asm-generic/mm_hooks.h should
be moved here.

Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-24 17:49:41 -07:00
Akinobu Mita 3693a84d3b xtensa: use for_each_sg()
This replaces the plain loop over the sglist array with for_each_sg()
macro which consists of sg_next() function calls.  Since xtensa doesn't
select ARCH_HAS_SG_CHAIN, it is not necessary to use for_each_sg() in
order to loop over each sg element.  But this can help find problems
with drivers that do not properly initialize their sg tables when
CONFIG_DEBUG_SG is enabled.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-06-24 17:49:40 -07:00
Ingo Molnar 7ef3d7d58d Merge branches 'x86/apic', 'x86/asm', 'x86/mm' and 'x86/platform' into x86/core, to merge last updates
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-06-22 09:15:03 +02:00
Toshi Kani 556269c138 arch/*/io.h: Add ioremap_wt() to all architectures
Add ioremap_wt() to all arch-specific asm/io.h headers which
define ioremap_wc() locally. These headers do not include
<asm-generic/iomap.h>. Some of them include <asm-generic/io.h>,
but ioremap_wt() is defined for consistency since they define
all ioremap_xxx locally.

In all architectures without Write-Through support, ioremap_wt()
is defined indentical to ioremap_nocache().

frv and m68k already have ioremap_writethrough(). On those we
add ioremap_wt() indetical to ioremap_writethrough() and defines
ARCH_HAS_IOREMAP_WT in both architectures.

The ioremap_wt() interface is exported to drivers.

Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Elliott@hp.com
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luis R. Rodriguez <mcgrof@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: arnd@arndb.de
Cc: hch@lst.de
Cc: hmh@hmh.eng.br
Cc: jgross@suse.com
Cc: konrad.wilk@oracle.com
Cc: linux-mm <linux-mm@kvack.org>
Cc: linux-nvdimm@lists.01.org
Cc: stefan.bader@canonical.com
Cc: yigal@plexistor.com
Link: http://lkml.kernel.org/r/1433436928-31903-9-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-06-07 15:28:57 +02:00
Guenter Roeck e74993aef4 xtensa: Provide dummy dma_alloc_attrs() and dma_free_attrs()
xtensa:allmodconfig fails to build with the following errors.

drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
	In function ‘gk20a_instobj_dtor_dma’:
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:154:2: error:
	implicit declaration of function ‘dma_free_attrs’
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
	In function ‘gk20a_instobj_ctor_dma’:
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:218:2: error:
	implicit declaration of function ‘dma_alloc_attrs’

Xtensa does not provide those functions at this time.
Provide dummy implementations to avoid build errors.

Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Chris Zankel <chris@zankel.net>
2015-05-25 23:03:16 +00:00
Christoph Hellwig c546d5db75 remove scatterlist.h generation from arch Kbuild files
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-05-19 09:14:34 -06:00
Christoph Hellwig 84be456f88 remove <asm/scatterlist.h>
We don't have any arch specific scatterlist now that parisc switched over
to the generic one.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2015-05-05 13:35:39 -06:00
Linus Torvalds 96d928ed75 Xtensa changes and fixes for 4.1
- fix linker script transformation for .text / .text.fixup
 - wire bpf and execveat syscalls;
 - provide __NR_sync_file_range2 instead of __NR_sync_file_range, as that's
   what xtensa uses.
 
 - make xtfpgs LCD driver functional and configurable. This fixes hardware
   lockup on KC705/ML605 boot;
 - add audio subsystem bits to xtfpga DTS and provide sample KC705 config
   with audio features enabled.
 - add CY7C67300 USB controller support to XTFPGA.
 - fix locking issues in ISS network driver;
 - document PIC and MX interrupt distributor device tree bindings;
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVLzRJAAoJEI9vqH3mFV2sfzgQAKDUeAlMbq78vvz10dThU5I2
 bRM2z3nfH1pOz8MToYGJ2UQMUAX09EFcLvhgy61e6bHECvT4Pgrq7QPizD7kAXv4
 nHPFX5syHCy6ASKXYGrZj1+moaufkhYgA7hPAggaDtUA7v5fbWPRiHbYWgk4By/f
 oWkmKtd2Jv+YXyfi0zA1ccD5eh885UPfaC396UAq5PvD6SafjGYWSHci67TRTrIw
 Ejc+e+MWC+yS/6TWtpYUUCeV1YkeYPj+w9JJXCCHRBebtTNv4HHdjyE5DLyTH3+0
 3I+T5m8F07VYJ9Q2CZwfTQfU2/3vtxivw2EPcGa8UdubjLlxtIyhEZlJzg4HZn9W
 KkCaDMMPoLeuyYYlTtudQVXpAKuactTq0DUGGYUIbkdHbADCP9PVrOk6zsyQwa+B
 u4iW2KPyVHIHkOOHG8F7qPAkAYKvJYEZO/JXycmTBMDU4evE2zQHXEujU5PyW2FZ
 3CA5I0DxqsYK+PG0geDq+aZxdLYD44SiA6yD/P2YrBXRTDz/AaiBi0MhDT3taBYV
 0ttXdKyYM0QWNaLmqs/7HMG7X9daVG5qqv0IllkyXf8luDZMeA5LfCG+4flO8lZz
 oSHzDUj8HPZE2q9Mko66AH1UYbV8g3YkPUcS48/d7ZCOE2lkwlG/6T+IAxnPncIv
 NKGyz0J/m+D7YBVCDC8p
 =wl+K
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-20150416' of git://github.com/czankel/xtensa-linux

Pull Xtensa updates from Chris Zankel:

 - fix linker script transformation for .text / .text.fixup

 - wire bpf and execveat syscalls

 - provide __NR_sync_file_range2 instead of __NR_sync_file_range, as
   that's what xtensa uses.

 - make xtfpgs LCD driver functional and configurable.  This fixes
   hardware lockup on KC705/ML605 boot

 - add audio subsystem bits to xtfpga DTS and provide sample KC705
   config with audio features enabled

 - add CY7C67300 USB controller support to XTFPGA

 - fix locking issues in ISS network driver

 - document PIC and MX interrupt distributor device tree bindings

* tag 'xtensa-20150416' of git://github.com/czankel/xtensa-linux:
  xtensa: xtfpga: add CY7C67300 USB controller support
  irqchip: xtensa-pic: xtensa-mx: document DT bindings
  xtensa: ISS: fix locking in TAP network adapter
  xtensa: Fix fix linker script transformation for .text / .text.fixup
  xtensa: provide __NR_sync_file_range2 instead of __NR_sync_file_range
  xtensa: wire bpf and execveat syscalls
  xtensa: xtfpga: fix hardware lockup caused by LCD driver
  xtensa: xtfpga: provide defconfig with audio subsystem
  xtensa: xtfpga: add audio card to xtfpga DTS
2015-04-17 15:32:30 -04:00
Chris Zankel 7ead5b7e4a Linux 4.0
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVKu3vAAoJEHm+PkMAQRiGmk4H/0DPq3rGa4gBhxZoG7N/JDNe
 WxZPbo/gY0l75DDquN5DZ3QFM9SKPOrZj39k9OzvdVdbnkPz2Wf6iN7aO3+XJFUo
 VD+x4xxRy2v8uIXAVtUQ9kOJqOYX7Ifww2izXJT7umIdQwkgXd5gdcAasZcROllq
 +gVUMAdpMK3ZUKfEYu5tZrgYDb/b80h7P2O/FKOeYf7LKxwsn2sPCtXBeqRFBU6d
 yP0i5JNoZbNfCRx/wzuCABV12Sq+p7TnFU2bxsvDrciHJjI/0fM4DNi7/Pc1IbKf
 vOKwaS2q4m81FoZvOSfv9ZfnT/hAlRorc7aXX9al/mkIeWLZv4OMZZhd0h7OX0k=
 =Asl1
 -----END PGP SIGNATURE-----

Merge tag 'v4.0' into for_next

Linux 4.0
2015-04-14 03:51:35 +00:00
Richard Weinberger 3e66701cbd xtensa: Remove signal translation and exec_domain
As execution domain support is gone we can remove
signal translation from the signal code and remove
exec_domain from thread_info.

Signed-off-by: Richard Weinberger <richard@nod.at>
2015-04-12 21:03:29 +02:00
Richard Weinberger cb418fdb33 xtensa: Autogenerate offsets in struct thread_info
Maintaining offsets by hand is no fun.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Richard Weinberger <richard@nod.at>
2015-04-12 21:03:29 +02:00
Max Filippov 01e84c70fe xtensa: provide __NR_sync_file_range2 instead of __NR_sync_file_range
xtensa actually uses sync_file_range2 implementation, so it should
define __NR_sync_file_range2 as other architectures that use that
function. That fixes userspace interface (that apparently never worked)
and avoids special-casing xtensa in libc implementations.
See the thread ending at
http://lists.busybox.net/pipermail/uclibc/2015-February/048833.html
for more details.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-03-04 12:07:05 +03:00
Max Filippov d44679ab13 xtensa: wire bpf and execveat syscalls
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-03-04 12:07:04 +03:00
Linus Torvalds eaa0eda562 asm-generic: uaccess.h cleanup
Like in 3.19, I once more have a multi-stage cleanup for one asm-generic
 header file, this time the work was done by Michael Tsirkin and cleans
 up the uaccess.h file in asm-generic, as well as all architectures for
 which the respective maintainers did not pick up his patches directly.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAVONFpmCrR//JCVInAQIoYRAA1T3ID1bQLqdi8TU1X+vzutXzGFRhRFii
 u18GYeN6sGTcfqQD0GsNSaH7G8XehF3cgJ9eo4h9YkRPIG/0T0FO+dqdB0uRh8iy
 GKcUqVhgvCFpOBDUJC6FgMvgWWyVrgSUBqG6qSXck/PDcMSsUa/m/GcLhR/sHWGn
 EGEAzYNvJgdOaJ1z0vfPFK6mPwFwmYzIss5XFuoBAKKN856fBlxofkQqdpKjGDFH
 n0UziaJ5tbCdlZ9M9Y5JN9RU8yBCcOmGHnHUAQHz3BXOt9sD7o5jDuzsUbj+vUGJ
 gzNc8kee9Pyy8ZA1F959gspaxe5Oumq7NLgs3HDjK6ZDRKpJvZb6iXi56f15chlZ
 dItTbFSxCHOFs0d8XJKNbmPt44pJ/qKO+03lMIGttMkIm7hXfvyMWSPZV9G0Pu1y
 zbWEDgW2Mdrdt0saNSD46IEp+c7E5P3D9JSctQRdQjReoCbOHwqrSHi1Zeg97XL4
 I1E0KwDqFUw3P1dXr5ahXmR50ZigBGjN5Fz3N7GmJt2x4PRSS2Sw92hyCrL0YM8J
 56FdRA7UJ0V/SzmAko3F5wWmhabc6L+qrVA42R6U3SNSjU8hwppOkYKDINNhPZfL
 SGy1oQS6Jj10WxLOVp66NC7XxXzBybDcQnatz4XtNN8P5sfekUGSGBeMyMsHl7IJ
 9MT3xym+DWU=
 =LROx
 -----END PGP SIGNATURE-----

Merge tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm-generic uaccess.h cleanup from Arnd Bergmann:
 "Like in 3.19, I once more have a multi-stage cleanup for one
  asm-generic header file, this time the work was done by Michael
  Tsirkin and cleans up the uaccess.h file in asm-generic, as well as
  all architectures for which the respective maintainers did not pick up
  his patches directly"

* tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (37 commits)
  sparc32: nocheck uaccess coding style tweaks
  sparc64: nocheck uaccess coding style tweaks
  xtensa: macro whitespace fixes
  sh: macro whitespace fixes
  parisc: macro whitespace fixes
  m68k: macro whitespace fixes
  m32r: macro whitespace fixes
  frv: macro whitespace fixes
  cris: macro whitespace fixes
  avr32: macro whitespace fixes
  arm64: macro whitespace fixes
  arm: macro whitespace fixes
  alpha: macro whitespace fixes
  blackfin: macro whitespace fixes
  sparc64: uaccess_64 macro whitespace fixes
  sparc32: uaccess_32 macro whitespace fixes
  avr32: whitespace fix
  sh: fix put_user sparse errors
  metag: fix put_user sparse errors
  ia64: fix put_user sparse errors
  ...
2015-02-18 10:02:24 -08:00
Andy Lutomirski f56141e3e2 all arches, signal: move restart_block to struct task_struct
If an attacker can cause a controlled kernel stack overflow, overwriting
the restart block is a very juicy exploit target.  This is because the
restart_block is held in the same memory allocation as the kernel stack.

Moving the restart block to struct task_struct prevents this exploit by
making the restart_block harder to locate.

Note that there are other fields in thread_info that are also easy
targets, at least on some architectures.

It's also a decent simplification, since the restart code is more or less
identical on all architectures.

[james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: David Miller <davem@davemloft.net>
Acked-by: Richard Weinberger <richard@nod.at>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-12 18:54:12 -08:00
Kirill A. Shutemov d016bf7ece mm: make FIRST_USER_ADDRESS unsigned long on all archs
LKP has triggered a compiler warning after my recent patch "mm: account
pmd page tables to the process":

    mm/mmap.c: In function 'exit_mmap':
 >> mm/mmap.c:2857:2: warning: right shift count >= width of type [enabled by default]

The code:

 > 2857                WARN_ON(mm_nr_pmds(mm) >
   2858                                round_up(FIRST_USER_ADDRESS, PUD_SIZE) >> PUD_SHIFT);

In this, on tile, we have FIRST_USER_ADDRESS defined as 0.  round_up() has
the same type -- int.  PUD_SHIFT.

I think the best way to fix it is to define FIRST_USER_ADDRESS as unsigned
long.  On every arch for consistency.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-11 17:06:03 -08:00
Kirill A. Shutemov d9ecee281b xtensa: drop _PAGE_FILE and pte_file()-related helpers
We've replaced remap_file_pages(2) implementation with emulation.  Nobody
creates non-linear mapping anymore.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-10 14:30:33 -08:00
Michael S. Tsirkin 33a3dcc228 xtensa: macro whitespace fixes
While working on arch/xtensa/include/asm/uaccess.h, I noticed
that some macros within this header are made harder to read because they
violate a coding style rule: space is missing after comma.

Fix it up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
2015-01-13 15:24:10 +02:00
Linus Torvalds a643fc7253 Xtensa fixes for 3.19:
- fix nommu support;
 - remove s6000 variant and s6105 platform.
 - fix permissions for kmapped pages so that copy_to_user_page works with them.
 - add power management menu to Kconfig to allow use of runtime PM.
 - disable linker optimizations because of a linker bug.
 - fix sparse error.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJUj+PnAAoJEI9vqH3mFV2s13sP/iNDjBFhYLkPTTTdLKcLwMoS
 ZfWKsKmmmbvSTAN2rpzdRt45hcDpukAbtxBh7zKoIz2w8jnCBVWEWos9J8Wefy4X
 WHuMm8QsQ5dK57F6I36db2ET1cJUlgAKnXUykd8w1HY/9QEUCa1FoAYiIQjQoMDA
 6X6ZvXI4tuneMpE+Hz1xsFxkyY1HOPULnlKHbplaDZtXZ9GCrYMD6t6h5BbpvLmk
 WoSx2aPJvoNIaQgLBNAqDZ7vGd3AaPgztQTho0hWvja9DRECzkjEZoZ5OFwzDl/f
 YGmaY4Vd+RNlhDKBUiqv7KVwPIv6jJwSYQXOYnMBtgr6JSfs8R/0yiylmj9FK/Wb
 f+t3gG9/iFfKNZ7uKDp6uqGUJVQe2tUBFQIFFVpQ7knLy1b7ZYHQm8k+kugBX41+
 4JJcTY7F+SiFLCqinKnstKiLjt9GzPrjPXRNoJ6bcpC0RGY8Eem6hCogSepgEH1w
 E0Wh3E0HMgoQR6rnXpaDHx9ld0zcZkBymVSwQCP89mXbAhxlIV511USmoNaYeJm/
 u6kXyyrvvDrOmSoAufeWf53AV2AxLY6fGRPjCoME4I/qJOyFOdNuuMLv3Emjq+m4
 1bw1BoPVMAXCdRdt8pR1uzsbKyaS4KOZbDP6+p3TTG2L0YJFJ6iJ8hAey9rtEy5Y
 HZqGD4j1ZzWqwfTwz94F
 =ePa2
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-next-20141215' of git://github.com/czankel/xtensa-linux

Pull Xtensa fixes from Chris Zankel:
 - fix nommu support
 - remove s6000 variant and s6105 platform
 - fix permissions for kmapped pages so that copy_to_user_page works with them
 - add power management menu to Kconfig to allow use of runtime PM
 - disable linker optimizations because of a linker bug
 - fix sparse error

* tag 'xtensa-next-20141215' of git://github.com/czankel/xtensa-linux:
  xtensa: disable link optimization
  xtensa/uaccess: fix sparse errors
  xtensa: fix kmap_prot definition
  xtensa: add power management menu to Kconfig
  xtensa: remove s6000 variant and s6105 platform
  xtensa: make PLATFORM_DEFAULT_MEM parameters configurable
  xtensa: nommu: clean up memory map dump
  xtensa: nommu: reserve memory below PLATFORM_DEFAULT_MEM_START
  xtensa: nommu: set up cache and atomctl in initialize_mmu
  xtensa: move vecbase SR initialization to _startup
  xtensa: nommu: fix uImage load address
  xtensa: nommu: fix load address definitions
  xtensa: nommu: fix Image.elf reset code and ld script
  xtensa: nommu: add MMU dependency to DEBUG_TLB_SANITY
  xtensa: nommu: don't build most of the cache flushing code
  xtensa: nommu: don't provide arch_get_unmapped_area
  xtensa: nommu: provide MAP_UNINITIALIZED definition
  xtensa: nommu: provide _PAGE_CHG_MASK definition
  xtensa: nommu: provide __invalidate_dcache_page_alias stub
  xtensa: nommu: move init_mmu stub to nommu_context.h
2014-12-16 14:08:53 -08:00
Michael S. Tsirkin 4255a8e199 xtensa/uaccess: fix sparse errors
virtio wants to read bitwise types from userspace using get_user.  At the
moment this triggers sparse errors, since the value is passed through an
integer.

Fix that up using __force.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
2014-12-15 20:14:26 -08:00
Chris Zankel 2cb54e8493 Xtensa improvements for 3.19:
- fix permissions for kmapped pages so that copy_to_user_page works with
   them;
 - add power management menu to Kconfig to allow use of runtime PM.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUi7VsAAoJEFH5zJH4P6BEpS8P/jsHzgGyaCmvr8MI+I6wImIt
 orEhkxOYQS4aBAi/azupTPYbu8r2I8+yscWtFxBnvJok3rT2yMtSJZFLUhur0nG4
 DQwQduMeHbzSC4ADqJBalfaOfpcwz/GQoM6IPVZEEW6h4vzCvUm0O1Wq5Z1Thbg2
 skMmVFIX2+YTwUrEKMEqbl1JevNzNH53t/tlTgiXOMkZWwL1R4ToRsFHv9zpIJ1m
 Srm0BWAXAM+h1vx1Pv2vwmTcgPj3MdBccsla/HAybeQraqThdlgAz9Cnk5T5AdWE
 6rLy9mw+LiT1kXnbl4Z526NBzvkf+5+xYiGqI3UwohhFEChq74PBPQnZlpZ2AGlG
 dI/i9CoV0uQgU3rRDvS9NNFXXW59objKIu8f2Od5pS4kgV+mPjKePVTJbchXIf5n
 MC7Dq2GcM8jK4/Q32aHNxDi9jM3jukd7pJHbyxOo0g1SpmSEnNSJ+CcOV5ft6nLB
 xIohvVXg8Om976Xbl6eRii7lNdCZm8j7mDNMl37lwaqitIgZmlGeRhAyYCnjC1Pl
 mxtORfQbGfUHw/o8TlhyINBNQdpLr0CRTL4HCrMyiDDQ0mJH3bMBKuSk7y0Qe8DG
 aJ8Om29CKvawr3irehNRsZiSfoqiPG6F/GzfFxfgSut/AKAMI25kMSoGZCjBMhHn
 76+jWe4WzygZCAUWzmsl
 =9vUt
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-for-next-20141213' of git://github.com/jcmvbkbc/linux-xtensa into for_next

Xtensa improvements for 3.19:

- fix permissions for kmapped pages so that copy_to_user_page works with
  them;
- add power management menu to Kconfig to allow use of runtime PM.
2014-12-15 20:10:39 -08:00
Linus Torvalds 70e71ca0af Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:

 1) New offloading infrastructure and example 'rocker' driver for
    offloading of switching and routing to hardware.

    This work was done by a large group of dedicated individuals, not
    limited to: Scott Feldman, Jiri Pirko, Thomas Graf, John Fastabend,
    Jamal Hadi Salim, Andy Gospodarek, Florian Fainelli, Roopa Prabhu

 2) Start making the networking operate on IOV iterators instead of
    modifying iov objects in-situ during transfers.  Thanks to Al Viro
    and Herbert Xu.

 3) A set of new netlink interfaces for the TIPC stack, from Richard
    Alpe.

 4) Remove unnecessary looping during ipv6 routing lookups, from Martin
    KaFai Lau.

 5) Add PAUSE frame generation support to gianfar driver, from Matei
    Pavaluca.

 6) Allow for larger reordering levels in TCP, which are easily
    achievable in the real world right now, from Eric Dumazet.

 7) Add a variable of napi_schedule that doesn't need to disable cpu
    interrupts, from Eric Dumazet.

 8) Use a doubly linked list to optimize neigh_parms_release(), from
    Nicolas Dichtel.

 9) Various enhancements to the kernel BPF verifier, and allow eBPF
    programs to actually be attached to sockets.  From Alexei
    Starovoitov.

10) Support TSO/LSO in sunvnet driver, from David L Stevens.

11) Allow controlling ECN usage via routing metrics, from Florian
    Westphal.

12) Remote checksum offload, from Tom Herbert.

13) Add split-header receive, BQL, and xmit_more support to amd-xgbe
    driver, from Thomas Lendacky.

14) Add MPLS support to openvswitch, from Simon Horman.

15) Support wildcard tunnel endpoints in ipv6 tunnels, from Steffen
    Klassert.

16) Do gro flushes on a per-device basis using a timer, from Eric
    Dumazet.  This tries to resolve the conflicting goals between the
    desired handling of bulk vs.  RPC-like traffic.

17) Allow userspace to ask for the CPU upon what a packet was
    received/steered, via SO_INCOMING_CPU.  From Eric Dumazet.

18) Limit GSO packets to half the current congestion window, from Eric
    Dumazet.

19) Add a generic helper so that all drivers set their RSS keys in a
    consistent way, from Eric Dumazet.

20) Add xmit_more support to enic driver, from Govindarajulu
    Varadarajan.

21) Add VLAN packet scheduler action, from Jiri Pirko.

22) Support configurable RSS hash functions via ethtool, from Eyal
    Perry.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1820 commits)
  Fix race condition between vxlan_sock_add and vxlan_sock_release
  net/macb: fix compilation warning for print_hex_dump() called with skb->mac_header
  net/mlx4: Add support for A0 steering
  net/mlx4: Refactor QUERY_PORT
  net/mlx4_core: Add explicit error message when rule doesn't meet configuration
  net/mlx4: Add A0 hybrid steering
  net/mlx4: Add mlx4_bitmap zone allocator
  net/mlx4: Add a check if there are too many reserved QPs
  net/mlx4: Change QP allocation scheme
  net/mlx4_core: Use tasklet for user-space CQ completion events
  net/mlx4_core: Mask out host side virtualization features for guests
  net/mlx4_en: Set csum level for encapsulated packets
  be2net: Export tunnel offloads only when a VxLAN tunnel is created
  gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
  cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
  net: fec: only enable mdio interrupt before phy device link up
  net: fec: clear all interrupt events to support i.MX6SX
  net: fec: reset fep link status in suspend function
  net: sock: fix access via invalid file descriptor
  net: introduce helper macro for_each_cmsghdr
  ...
2014-12-11 14:27:06 -08:00
Daniel Borkmann 0cb6c969ed net, lib: kill arch_fast_hash library bits
As there are now no remaining users of arch_fast_hash(), lets kill
it entirely.

This basically reverts commit 71ae8aac3e ("lib: introduce arch
optimized hash library") and follow-up work, that is f.e., commit
237217546d ("lib: hash: follow-up fixups for arch hash"),
commit e3fec2f74f ("lib: Add missing arch generic-y entries for
asm-generic/hash.h") and last but not least commit 6a02652df5
("perf tools: Fix include for non x86 architectures").

Cc: Francesco Fusco <fusco@ntop.org>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-10 15:17:46 -05:00
Linus Torvalds a0e4467726 asm-generic: asm/io.h rewrite
While there normally is no reason to have a pull request for asm-generic
 but have all changes get merged through whichever tree needs them, I do
 have a series for 3.19. There are two sets of patches that change
 significant portions of asm/io.h, and this branch contains both in order
 to resolve the conflicts:
 
 - Will Deacon has done a set of patches to ensure that all architectures
   define {read,write}{b,w,l,q}_relaxed() functions or get them by
   including asm-generic/io.h. These functions are commonly used on ARM
   specific drivers to avoid expensive L2 cache synchronization implied by
   the normal {read,write}{b,w,l,q}, but we need to define them on all
   architectures in order to share the drivers across architectures and
   to enable CONFIG_COMPILE_TEST configurations for them
 
 - Thierry Reding has done an unrelated set of patches that extends
   the asm-generic/io.h file to the degree necessary to make it useful
   on ARM64 and potentially other architectures.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAVIdwNmCrR//JCVInAQJWuw/9FHt2ThMnI1J1Jqy4CVwtyjWTSa6Y/uVj
 xSytS7AOvmU/nw1quSoba5mN9fcUQUtK9kqjqNcq71WsQcDE6BF9SFpi9cWtjWcI
 ZfWsC+5kqry/mbnuHefENipem9RqBrLbOBJ3LARf5M8rZJuTz1KbdZs9r9+1QsCX
 ou8jeqVvNKUn9J1WyekJBFSrPOtZ4bCUpeyh23JHRfPtJeAHNOuPuymj6WceAz98
 uMV1icRaCBMySsf9HgsHRYW5HwuCm3MrrYj6ukyPpgxYz7FRq4hJLDs6GnlFtAGb
 71g87NpFdB32qbW+y1ntfYaJyUryMHMVHBWcV5H9m0btdHTRHYZjoOGOPuyLHHO8
 +l4/FaOQhnDL8cNDj0HKfhdlyaFylcWgs1wzj68nv31c1dGjcJcQiyCDwry9mJhr
 erh4EewcerUvWzbBMQ4JP1f8syKMsKwbo1bVU61a1RQJxEqVCzJMLweGSOFmqMX2
 6E4ZJVWv81UFLoFTzYx+7+M45K4NWywKNQdzwKmqKHc4OQyvq4ALJI0A7SGFJdDR
 HJ7VqDiLaSdBitgJcJUxNzKcyXij6wE9jE1fBe3YDFE4LrnZXFVLN+MX6hs7AIFJ
 vJM1UpxRxQUMGIH2m7rbDNazOAsvQGxINOjNor23cNLuf6qLY1LrpHVPQDAfJVvA
 6tROM77bwIQ=
 =xUv6
 -----END PGP SIGNATURE-----

Merge tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm-generic asm/io.h rewrite from Arnd Bergmann:
 "While there normally is no reason to have a pull request for
  asm-generic but have all changes get merged through whichever tree
  needs them, I do have a series for 3.19.

  There are two sets of patches that change significant portions of
  asm/io.h, and this branch contains both in order to resolve the
  conflicts:

   - Will Deacon has done a set of patches to ensure that all
     architectures define {read,write}{b,w,l,q}_relaxed() functions or
     get them by including asm-generic/io.h.

     These functions are commonly used on ARM specific drivers to avoid
     expensive L2 cache synchronization implied by the normal
     {read,write}{b,w,l,q}, but we need to define them on all
     architectures in order to share the drivers across architectures
     and to enable CONFIG_COMPILE_TEST configurations for them

   - Thierry Reding has done an unrelated set of patches that extends
     the asm-generic/io.h file to the degree necessary to make it useful
     on ARM64 and potentially other architectures"

* tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (29 commits)
  ARM64: use GENERIC_PCI_IOMAP
  sparc: io: remove duplicate relaxed accessors on sparc32
  ARM: sa11x0: Use void __iomem * in MMIO accessors
  arm64: Use include/asm-generic/io.h
  ARM: Use include/asm-generic/io.h
  asm-generic/io.h: Implement generic {read,write}s*()
  asm-generic/io.h: Reconcile I/O accessor overrides
  /dev/mem: Use more consistent data types
  Change xlate_dev_{kmem,mem}_ptr() prototypes
  ARM: ixp4xx: Properly override I/O accessors
  ARM: ixp4xx: Fix build with IXP4XX_INDIRECT_PCI
  ARM: ebsa110: Properly override I/O accessors
  ARC: Remove redundant PCI_IOBASE declaration
  documentation: memory-barriers: clarify relaxed io accessor semantics
  x86: io: implement dummy relaxed accessor macros for writes
  tile: io: implement dummy relaxed accessor macros for writes
  sparc: io: implement dummy relaxed accessor macros for writes
  powerpc: io: implement dummy relaxed accessor macros for writes
  parisc: io: implement dummy relaxed accessor macros for writes
  mn10300: io: implement dummy relaxed accessor macros for writes
  ...
2014-12-09 17:25:00 -08:00
Max Filippov ff009ab6d4 xtensa: fix kmap_prot definition
Replace PAGE_KERNEL with PAGE_KERNEL_EXEC to allow copy_to_user_page
invalidate icache for pages mapped with kmap.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-12-09 03:22:57 +03:00
Alexei Starovoitov 89aa075832 net: sock: allow eBPF programs to be attached to sockets
introduce new setsockopt() command:

setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd, sizeof(prog_fd))

where prog_fd was received from syscall bpf(BPF_PROG_LOAD, attr, ...)
and attr->prog_type == BPF_PROG_TYPE_SOCKET_FILTER

setsockopt() calls bpf_prog_get() which increments refcnt of the program,
so it doesn't get unloaded while socket is using the program.

The same eBPF program can be attached to multiple sockets.

User task exit automatically closes socket which calls sk_filter_uncharge()
which decrements refcnt of eBPF program

Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-12-05 21:47:32 -08:00
David S. Miller 076ce44825 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/ethernet/chelsio/cxgb4vf/sge.c
	drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

sge.c was overlapping two changes, one to use the new
__dev_alloc_page() in net-next, and one to use s->fl_pg_order in net.

ixgbe_phy.c was a set of overlapping whitespace changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-14 01:01:12 -05:00
Eric Dumazet 2c8c56e15d net: introduce SO_INCOMING_CPU
Alternative to RPS/RFS is to use hardware support for multiple
queues.

Then split a set of million of sockets into worker threads, each
one using epoll() to manage events on its own socket pool.

Ideally, we want one thread per RX/TX queue/cpu, but we have no way to
know after accept() or connect() on which queue/cpu a socket is managed.

We normally use one cpu per RX queue (IRQ smp_affinity being properly
set), so remembering on socket structure which cpu delivered last packet
is enough to solve the problem.

After accept(), connect(), or even file descriptor passing around
processes, applications can use :

 int cpu;
 socklen_t len = sizeof(cpu);

 getsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU, &cpu, &len);

And use this information to put the socket into the right silo
for optimal performance, as all networking stack should run
on the appropriate cpu, without need to send IPI (RPS/RFS).

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-11 13:00:06 -05:00
Chris Zankel c0d7aa0750 Xtensa improvements for 3.18:
- fix nommu support;
 - remove s6000 variant and s6105 platform.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJURikHAAoJEFH5zJH4P6BEyT4P/RiqRMw5S1X/DxXeEHy2Xhpg
 IJsqF5OMymnWuoXuGje4akm8qfqObuCmsJ7FGLtw7XOQzJ9DwAhpetEtty+bpsvt
 btlay50h62J/GjNz028xlru4FzRW3lc7s4ArUdZLHBeHjG8sSd5SoVPwsH0S9/aL
 LJdRyv0E35PLK4yTHa806KerSBKF1k7VhbEJKEJqIu1w4rJrH8R610IZbP/uTKV2
 DijmP5xqQwcDp+j8gxutkJZqsktEvuERgDywCheoYt8E0mr45C418prw/CChyLez
 EXk0jV0zw8OI1rUPc1PEuLT7jik+j59PVMSZM5pFFZRBZbv82HfSa0ZlL22Q6Saa
 TwpcKybH9bQmWL8sKV6ASmGyqz4vl9ZFIIlDXkFw/Gj13ZXxo12kEqN2dsOFZuIn
 TBdgVvUigpS7U3e4cClavPBaqlSgrnYFbD+9Ehcml83MuNlv37gL4H0X0y2u2/Tl
 0Ixb3QEk69IAuycgX37jTVfwGZ4HTkYPFMZckGNoJ7eBVCahTSQesNm52xD5quz1
 HMY+atTzzKnx3DGFCBbYayuqm3aBVkEmjYnPeag6sY8UkhtF3yr6YNWepf3jxxL7
 cR27gwP/k2YBf9M38Jyh5fnjYST6qj3ByXLNE2aeNnSO+qvZMNPCeDJHrBx+Zvtt
 5BjU5/3HZkAWWhqy6Aim
 =sSwk
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-for-next-20141021-2' of git://github.com/jcmvbkbc/linux-xtensa into for_next

Xtensa improvements for 3.18:

- fix nommu support;
- remove s6000 variant and s6105 platform.
2014-11-10 00:24:48 -08:00
Chris Zankel 66acb0216d Xtensa improvements for 3.18:
- add seccomp, getrandom, and memfd_create syscalls;
 - add defconfigs for KC705 and SMP LX200;
 - fix ISS and xtfpga Kconfig dependencies so that more randconfigs
   are buildable;
 - fix umount syscall;
 - implement pgprot_noncached.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJURijdAAoJEFH5zJH4P6BEOggP/i2VVO18pYPA0f5F6tjHPKz5
 YWTz03ebJE41FJCuhXsoolYGfZjBAv2Vnad5GymqOWXBfq/9w+Lev8UVPBLb+7uu
 Qy6bWcYcHPk2xgUrPXJGfiiX/hItYDdWclEXk9zIdV9/yEzunus9d/OskMk69Lav
 37RT6K78mfkv9F0RzrK2UNpb1CLjXFJ8TmVDGv2Pvi1xNJKih+WEX/S9VmFDmQBP
 iuRCbKPgT1PqELn0Q76NaQzOs7i9C3sy55CLmPPTQjTvSlPwO3OTzOQ4QrDOVZtG
 GvBhbnVkBco5yOLLF+1lHGPyk+2kDfr4c/uqvFnHHM2lKs1pLw/80C5zzo6azzUO
 MgIQHBGwR6VnCY2a6UpK9NFGuGaKW6yl4yaMqKTTFUt8N/cQadjgZ19xPgPZZlg1
 Mll5ZeBs05g6/Ph3nGuBLfa21hnNk2iZjU7/5d1acQTNjCm1HdU3AjcqHBaWIt5o
 Ee0EhNRHRrq/bJv+dgLUXiezAAdMLMvmGSOIu9jNV2LmbwgdrjfcMJbiPfEFDvsA
 4+++z56iu5rqLWxrU+pMDInN3rY2W/s2fLwkmqZcy64g0uiZuNhh+fulBCSnbm+C
 qEyDZXFfPEq+cv9mTH0ieP5YowSCHraYY68ALWt/OVwjahp7b7R5ifIr27eziYkk
 KRQtlJAWIAIvh5fUrYaN
 =F6y4
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-for-next-20141021-1' of git://github.com/jcmvbkbc/linux-xtensa into for_next

Xtensa improvements for 3.18:

- add seccomp, getrandom, and memfd_create syscalls;
- add defconfigs for KC705 and SMP LX200;
- fix ISS and xtfpga Kconfig dependencies so that more randconfigs
  are buildable;
- fix umount syscall;
- implement pgprot_noncached.
2014-10-23 10:30:33 -07:00
Max Filippov 5a0b1d78bf xtensa: nommu: clean up memory map dump
noMMU configuration doesn't use special area for vmalloc allocations,
don't print it in the memory map.
PAGE_OFFSET is fixed to 0 in noMMU, use min_low_pfn and max_low_pfn for
lowmem range display.
Make all XCHAL_KSEG_* constants unsigned long for consistency with other
addresses.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:58 +04:00
Max Filippov 2eabc1800d xtensa: nommu: set up cache and atomctl in initialize_mmu
initialize_mmu sets up atomctl SR which is needed for s32c1i to function
correctly even in noMMU configurations. It's also a good place to set up
caching attributes of physical memory.

Allow enabling INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX in noMMU
configurations for setting up atomctl and cache attributes.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:56 +04:00
Max Filippov 53490121e9 xtensa: move vecbase SR initialization to _startup
Instead of initializing vecbase in initialize_mmu macro, which may be
expanded either in Image.elf reset vector hadler or in the kernel
head.S, both times only when CONFIG_MMU is enabled, do this
initialization once in _startup function.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:55 +04:00
Max Filippov 72bb305fdc xtensa: nommu: fix load address definitions
Change KERNELOFFSET, LOAD_MEMORY_ADDRESS and VIRTUAL_MEMORY_ADDRESS to be
relative to the start of physical memory in noMMU configuration, as
there's no uniform memory remapping to KSEG starting at 0xd0000000.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:53 +04:00
Max Filippov b6cee17b7d xtensa: nommu: don't build most of the cache flushing code
Most cache flushing code is only relevant for MMU. Don't build it for
nommu configuration.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:50 +04:00
Max Filippov f6891ddbc7 xtensa: nommu: provide MAP_UNINITIALIZED definition
Add MAP_UNINITIALIZED to xtensa version of mman.h to keep mm/nommu.c
happy.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:47 +04:00
Max Filippov 972c55bf70 xtensa: nommu: provide _PAGE_CHG_MASK definition
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:46 +04:00
Max Filippov 4d5ea70246 xtensa: nommu: provide __invalidate_dcache_page_alias stub
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:45 +04:00
Max Filippov c9d09bbec4 xtensa: nommu: move init_mmu stub to nommu_context.h
mmu_context.h is not used in nommu configuration, nommu_context.h is
used instead.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:44 +04:00
Max Filippov 2651cc6974 xtensa: re-wire umount syscall to sys_oldumount
Userspace actually passes single parameter (path name) to the umount
syscall, so new umount just fails. Fix it by requesting old umount
syscall implementation and re-wiring umount to it.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-21 13:28:41 +04:00
Will Deacon affd2ae5de xtensa: io: remove dummy relaxed accessor macros for reads
These are now defined by asm-generic/io.h, so we don't need the private
definitions anymore.

Cc: Chris Zankel <chris@zankel.net>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2014-10-20 18:49:17 +01:00
Linus Torvalds dbb885fecc Merge branch 'locking-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull arch atomic cleanups from Ingo Molnar:
 "This is a series kept separate from the main locking tree, which
  cleans up and improves various details in the atomics type handling:

   - Remove the unused atomic_or_long() method

   - Consolidate and compress atomic ops implementations between
     architectures, to reduce linecount and to make it easier to add new
     ops.

   - Rewrite generic atomic support to only require cmpxchg() from an
     architecture - generate all other methods from that"

* 'locking-arch-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
  locking,arch: Use ACCESS_ONCE() instead of cast to volatile in atomic_read()
  locking, mips: Fix atomics
  locking, sparc64: Fix atomics
  locking,arch: Rewrite generic atomic support
  locking,arch,xtensa: Fold atomic_ops
  locking,arch,sparc: Fold atomic_ops
  locking,arch,sh: Fold atomic_ops
  locking,arch,powerpc: Fold atomic_ops
  locking,arch,parisc: Fold atomic_ops
  locking,arch,mn10300: Fold atomic_ops
  locking,arch,mips: Fold atomic_ops
  locking,arch,metag: Fold atomic_ops
  locking,arch,m68k: Fold atomic_ops
  locking,arch,m32r: Fold atomic_ops
  locking,arch,ia64: Fold atomic_ops
  locking,arch,hexagon: Fold atomic_ops
  locking,arch,cris: Fold atomic_ops
  locking,arch,avr32: Fold atomic_ops
  locking,arch,arm64: Fold atomic_ops
  locking,arch,arm: Fold atomic_ops
  ...
2014-10-13 15:48:00 +02:00
Linus Torvalds afa3536be8 Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar:
 "Main changes:

  - Fix the deadlock reported by Dave Jones et al
  - Clean up and fix nohz_full interaction with arch abilities
  - nohz init code consolidation/cleanup"

* 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  nohz: nohz full depends on irq work self IPI support
  nohz: Consolidate nohz full init code
  arm64: Tell irq work about self IPI support
  arm: Tell irq work about self IPI support
  x86: Tell irq work about self IPI support
  irq_work: Force raised irq work to run on irq work interrupt
  irq_work: Introduce arch_irq_work_has_interrupt()
  nohz: Move nohz full init call to tick init
2014-10-09 06:30:57 -04:00
Max Filippov bb550fd5c3 xtensa: add seccomp, getrandom, and memfd_create syscalls
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-06 03:23:52 +04:00
Max Filippov a211276a8e xtensa: implement pgprot_noncached
The default pgprot_noncached doesn't do anything. This leads to issues
when drivers rely on it to disable caching in userspace mappings.
Implement pgprot_noncached properly so that caching of userspace mappings
could be controlled.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2014-10-06 03:23:50 +04:00
Pranith Kumar 2291059c85 locking,arch: Use ACCESS_ONCE() instead of cast to volatile in atomic_read()
Use the much more reader friendly ACCESS_ONCE() instead of the cast to volatile.
This is purely a stylistic change.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-arch@vger.kernel.org
Link: http://lkml.kernel.org/r/1411482607-20948-1-git-send-email-bobby.prani@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-10-03 06:06:23 +02:00
Peter Zijlstra c5c38ef3d7 irq_work: Introduce arch_irq_work_has_interrupt()
The nohz full code needs irq work to trigger its own interrupt so that
the subsystem can work even when the tick is stopped.

Lets introduce arch_irq_work_has_interrupt() that archs can override to
tell about their support for this ability.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
2014-09-13 18:38:07 +02:00
Ricardo Ribalda Delgado a9a2eab5fb xtensa/uapi: Add definition of TIOC[SG]RS485
Commit: e676253b19 [3/21] serial/8250: Add
support for RS485 IOCTLs, adds support for RS485 ioctls for 825_core on
all the archs. Unfortunaltely the definition of TIOCSRS485 and
TIOCGRS485 was missing on the ioctls.h file

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-09 22:34:49 -07:00
Chris Zankel e792290be7 Xtensa improvements for 3.17:
- support highmem on cores with aliasing data cache. Enable highmem on kc705
   by default;
 - simplify addition of new core variants (no need to modify Kconfig /
   Makefiles);
 - improve robustness of unaligned access handler and its interaction with
   window overflow/underflow exception handlers;
 - deprecate atomic and spill registers syscalls;
 - clean up Kconfig: remove orphan MATH_EMULATION, sort 'select' statements;
 - wire up renameat2 syscall.
 
 Various fixes:
 - fix address checks in dma_{alloc,free}_coherent (runtime BUG);
 - fix access to THREAD_RA/THREAD_SP/THREAD_DS (debug build breakage);
 - fix TLBTEMP_BASE_2 region handling in fast_second_level_miss (runtime
   unrecoverable exception);
 - fix a6 and a7 handling in fast_syscall_xtensa (runtime userspace register
   clobbering);
 - fix kernel/user jump out of fast_unaligned (potential runtime unrecoverable
   exception);
 - replace termios IOCTL code definitions with constants (userspace build
   breakage).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJT7YTeAAoJEFH5zJH4P6BEnOYQAJ716CslOAM96DyMWilpSHmn
 y9Ei5UDorzm7Qiqeg3h0t8BafjDKobAAV+9YP29wPXU5+CKCQTWG8u4n+2BjMyM5
 4OyG9SiAJnHpTnySiASmvMiG3slL34VXCyDhWMmF2dQ8CX4+GFm7RSHNy62l4fYR
 x9iySEtZPD7Uv7aKVfUfIPpY926S+kL3mhOUwlDwMEuDJQhS4oqxc+JL1xoG5XwQ
 qoCjAEDvoyPgSPKg9dmLpAlbhERe20KPD6biraJ3gW/gAvIMxmeC88rybzF01RbL
 bf5J93UHay5mQhheAz25Gg2k0DoQHgONsnqmlMOgNk0u/hFJGqnz54DONVzBplVR
 16VEHdDmUwO5+cuFDyfcZTtU0u0yV9l+Rr+NLUekyxhjVlL7o5648rZufLLBrnNK
 SQ+ueI3rp1thnHR+L5iB/E+abjGoUK6TsWJGNYvY6kOPArz9OEKHQkFOhEYip9t2
 vT7qfz/YKX0dc8ZwCeSwif/haeChHOvuJU2MKqKBz0McwXv7QxcadYR1o3mP87BL
 Lp9vibaVaBUT9SkZFtNJwEgJ7WeSV5EN1faakATFRR7H/qhMtUDDFRXAZLcGwUV/
 yF60YQuFW0jdwKaEtI1TI1zmckFxPxLwfTXWKob+T4E8KE+k5ZXq1Vcl9FoB5pWG
 Jcxn92MhHKKl7EAXeveo
 =q9be
 -----END PGP SIGNATURE-----

Merge tag 'xtensa-for-next-20140815' into for_next

Xtensa improvements for 3.17:
- support highmem on cores with aliasing data cache. Enable highmem on kc705
  by default;
- simplify addition of new core variants (no need to modify Kconfig /
  Makefiles);
- improve robustness of unaligned access handler and its interaction with
  window overflow/underflow exception handlers;
- deprecate atomic and spill registers syscalls;
- clean up Kconfig: remove orphan MATH_EMULATION, sort 'select' statements;
- wire up renameat2 syscall.

Various fixes:
- fix address checks in dma_{alloc,free}_coherent (runtime BUG);
- fix access to THREAD_RA/THREAD_SP/THREAD_DS (debug build breakage);
- fix TLBTEMP_BASE_2 region handling in fast_second_level_miss (runtime
  unrecoverable exception);
- fix a6 and a7 handling in fast_syscall_xtensa (runtime userspace register
  clobbering);
- fix kernel/user jump out of fast_unaligned (potential runtime unrecoverable
  exception);
- replace termios IOCTL code definitions with constants (userspace build
  breakage).

Signed-off-by: Chris Zankel <chris@zankel.net>
2014-08-18 17:30:24 -07:00