1. 06 10月, 2012 18 次提交
  2. 05 10月, 2012 1 次提交
    • M
      c6x: remove c6x signal.h · 2e919f76
      Mark Salter 提交于
      The c6x signal.h includes the asm-generic version and provides
      a couple of extern declarations. David Howells pointed out that
      the externs needed to be protected by ifdef __KERNEL__. As it
      turns out, the externs aren't really needed since the functions
      are only called from asm code. So this patch gets rid of the
      c6x signal.h and uses just the asm-generic version.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      2e919f76
  3. 04 10月, 2012 6 次提交
    • D
      UAPI: Split compound conditionals containing __KERNEL__ in Arm64 · 1c1e4362
      David Howells 提交于
      Split compound conditionals containing __KERNEL__ in Arm64 where possible to
      make it easier for the UAPI disintegration scripts to handle them.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      1c1e4362
    • D
      UAPI: Fix the guards on various asm/unistd.h files · 89013952
      David Howells 提交于
      asm-generic/unistd.h and a number of asm/unistd.h files have been given
      reinclusion guards that allow the guard to be overridden if __SYSCALL is
      defined.  Unfortunately, these files define __SYSCALL and don't undefine it
      when they've finished with it, thus rendering the guard ineffective.
      
      The reason for this override is to allow the file to be #included multiple
      times with different settings on __SYSCALL for purposes like generating syscall
      tables.
      
      The following guards are problematic:
      
      arch/arm64/include/asm/unistd.h:#if !defined(__ASM_UNISTD_H) || defined(__SYSCALL)
      arch/arm64/include/asm/unistd32.h:#if !defined(__ASM_UNISTD32_H) || defined(__SYSCALL)
      arch/c6x/include/asm/unistd.h:#if !defined(_ASM_C6X_UNISTD_H) || defined(__SYSCALL)
      arch/hexagon/include/asm/unistd.h:#if !defined(_ASM_HEXAGON_UNISTD_H) || defined(__SYSCALL)
      arch/openrisc/include/asm/unistd.h:#if !defined(__ASM_OPENRISC_UNISTD_H) || defined(__SYSCALL)
      arch/score/include/asm/unistd.h:#if !defined(_ASM_SCORE_UNISTD_H) || defined(__SYSCALL)
      arch/tile/include/asm/unistd.h:#if !defined(_ASM_TILE_UNISTD_H) || defined(__SYSCALL)
      arch/unicore32/include/asm/unistd.h:#if !defined(__UNICORE_UNISTD_H__) || defined(__SYSCALL)
      include/asm-generic/unistd.h:#if !defined(_ASM_GENERIC_UNISTD_H) || defined(__SYSCALL)
      
      On the assumption that the guards' ineffectiveness has passed unnoticed, just
      remove these guards entirely.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      89013952
    • J
      crypto: x86/glue_helper - fix storing of new IV in CBC encryption · c9f97a27
      Jussi Kivilinna 提交于
      Glue_helper incorrectly XORs new IV over old IV at end of CBC encryption
      function when it should store. This causes CBC encryption to give
      incorrect output on multi-page encryption requests.
      Signed-off-by: NJussi Kivilinna <jussi.kivilinna@mbnet.fi>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      c9f97a27
    • A
      powerpc/iommu: Fix multiple issues with IOMMU pools code · d900bd73
      Anton Blanchard 提交于
      There are a number of issues in the recent IOMMU pools code:
      
      - On a preempt kernel we might switch CPUs in the middle of building
        a scatter gather list. When this happens the handle hint passed in
        no longer falls within the local CPU's pool. Check for this and
        fall back to the pool hint.
      
      - We were missing a spin_unlock/spin_lock in one spot where we
        switch pools.
      
      - We need to provide locking around dart_tlb_invalidate_all and
        dart_tlb_invalidate_one now that the global lock is gone.
      Reported-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@kernel.org> [v3.6]
      d900bd73
    • N
      powerpc: Fix VMX fix for memcpy case · c8adfecc
      Nishanth Aravamudan 提交于
      In 2fae7cdb ("powerpc: Fix VMX in
      interrupt check in POWER7 copy loops"), Anton inadvertently
      introduced a regression for memcpy on POWER7 machines. copyuser and
      memcpy diverge slightly in their use of cr1 (copyuser doesn't use it,
      but memcpy does) and you end up clobbering that register with your fix.
      That results in (taken from an FC18 kernel):
      
      [   18.824604] Unrecoverable VMX/Altivec Unavailable Exception f20 at c000000000052f40
      [   18.824618] Oops: Unrecoverable VMX/Altivec Unavailable Exception, sig: 6 [#1]
      [   18.824623] SMP NR_CPUS=1024 NUMA pSeries
      [   18.824633] Modules linked in: tg3(+) be2net(+) cxgb4(+) ipr(+) sunrpc xts lrw gf128mul dm_crypt dm_round_robin dm_multipath linear raid10 raid456 async_raid6_recov async_memcpy async_pq raid6_pq async_xor xor async_tx raid1 raid0 scsi_dh_rdac scsi_dh_hp_sw scsi_dh_emc scsi_dh_alua squashfs cramfs
      [   18.824705] NIP: c000000000052f40 LR: c00000000020b874 CTR: 0000000000000512
      [   18.824709] REGS: c000001f1fef7790 TRAP: 0f20   Not tainted  (3.6.0-0.rc6.git0.2.fc18.ppc64)
      [   18.824713] MSR: 8000000000009032 <SF,EE,ME,IR,DR,RI>  CR: 4802802e  XER: 20000010
      [   18.824726] SOFTE: 0
      [   18.824728] CFAR: 0000000000000f20
      [   18.824731] TASK = c000000fa7128400[0] 'swapper/24' THREAD: c000000fa7480000 CPU: 24
      GPR00: 00000000ffffffc0 c000001f1fef7a10 c00000000164edc0 c000000f9b9a8120
      GPR04: c000000f9b9a8124 0000000000001438 0000000000000060 03ffffff064657ee
      GPR08: 0000000080000000 0000000000000010 0000000000000020 0000000000000030
      GPR12: 0000000028028022 c00000000ff25400 0000000000000001 0000000000000000
      GPR16: 0000000000000000 7fffffffffffffff c0000000016b2180 c00000000156a500
      GPR20: c000000f968c7a90 c0000000131c31d8 c000001f1fef4000 c000000001561d00
      GPR24: 000000000000000a 0000000000000000 0000000000000001 0000000000000012
      GPR28: c000000fa5c04f80 00000000000008bc c0000000015c0a28 000000000000022e
      [   18.824792] NIP [c000000000052f40] .memcpy_power7+0x5a0/0x7c4
      [   18.824797] LR [c00000000020b874] .pcpu_free_area+0x174/0x2d0
      [   18.824800] Call Trace:
      [   18.824803] [c000001f1fef7a10] [c000000000052c14] .memcpy_power7+0x274/0x7c4 (unreliable)
      [   18.824809] [c000001f1fef7b10] [c00000000020b874] .pcpu_free_area+0x174/0x2d0
      [   18.824813] [c000001f1fef7bb0] [c00000000020ba88] .free_percpu+0xb8/0x1b0
      [   18.824819] [c000001f1fef7c50] [c00000000043d144] .throtl_pd_exit+0x94/0xd0
      [   18.824824] [c000001f1fef7cf0] [c00000000043acf8] .blkg_free+0x88/0xe0
      [   18.824829] [c000001f1fef7d90] [c00000000018c048] .rcu_process_callbacks+0x2e8/0x8a0
      [   18.824835] [c000001f1fef7e90] [c0000000000a8ce8] .__do_softirq+0x158/0x4d0
      [   18.824840] [c000001f1fef7f90] [c000000000025ecc] .call_do_softirq+0x14/0x24
      [   18.824845] [c000000fa7483650] [c000000000010e80] .do_softirq+0x160/0x1a0
      [   18.824850] [c000000fa74836f0] [c0000000000a94a4] .irq_exit+0xf4/0x120
      [   18.824854] [c000000fa7483780] [c000000000020c44] .timer_interrupt+0x154/0x4d0
      [   18.824859] [c000000fa7483830] [c000000000003be0] decrementer_common+0x160/0x180
      [   18.824866] --- Exception: 901 at .plpar_hcall_norets+0x84/0xd4
      [   18.824866]     LR = .check_and_cede_processor+0x48/0x80
      [   18.824871] [c000000fa7483b20] [c00000000007f018] .check_and_cede_processor+0x18/0x80 (unreliable)
      [   18.824877] [c000000fa7483b90] [c00000000007f104] .dedicated_cede_loop+0x84/0x150
      [   18.824883] [c000000fa7483c50] [c0000000006bc030] .cpuidle_enter+0x30/0x50
      [   18.824887] [c000000fa7483cc0] [c0000000006bc9f4] .cpuidle_idle_call+0x104/0x720
      [   18.824892] [c000000fa7483d80] [c000000000070af8] .pSeries_idle+0x18/0x40
      [   18.824897] [c000000fa7483df0] [c000000000019084] .cpu_idle+0x1a4/0x380
      [   18.824902] [c000000fa7483ec0] [c0000000008a4c18] .start_secondary+0x520/0x528
      [   18.824907] [c000000fa7483f90] [c0000000000093f0] .start_secondary_prolog+0x10/0x14
      [   18.824911] Instruction dump:
      [   18.824914] 38840008 90030000 90e30004 38630008 7ca62850 7cc300d0 78c7e102 7cf01120
      [   18.824923] 78c60660 39200010 39400020 39600030 <7e00200c> 7c0020ce 38840010 409f001c
      [   18.824935] ---[ end trace 0bb95124affaaa45 ]---
      [   18.825046] Unrecoverable VMX/Altivec Unavailable Exception f20 at c000000000052d08
      
      I believe the right fix is to make memcpy match usercopy and not use
      cr1.
      Signed-off-by: NNishanth Aravamudan <nacc@us.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@kernel.org> [v3.6]
      c8adfecc
    • M
      c6x: make dsk6455 the default config · 37d11ab8
      Mark Salter 提交于
      C6X had no defconfig, so DSK6455 is as good as any.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      37d11ab8
  4. 03 10月, 2012 11 次提交
    • J
      CRIS: Remove VCS simulator specific code · d75d806c
      Jesper Nilsson 提交于
      The VCS simulator was a tool used in the development of the chip
      and is no longer used or necessary.
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      d75d806c
    • B
      cris/PCI: remove pcibios_assign_resources() · 227c6fc2
      Bjorn Helgaas 提交于
      There's no caller of pcibios_assign_resources() in the tree.  It is
      exported, so an out-of-tree module *could* call it, but no other arch
      exports pcibios_assign_resources(), so it would have to be a CRIS-specific
      module.  I doubt such a caller exists.
      
      CC: Mikael Starvik <starvik@axis.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NJesper Nilsson <jesper.nilsson@axis.com>
      227c6fc2
    • A
      sparc: fix format string argument for prom_printf() · 5da444aa
      Akinobu Mita 提交于
      prom_printf() takes printf style arguments.  Specifing GCC's format
      attribute reveals that there are several wrong usages of prom_printf().
      
      This fixes those wrong format strings and arguments, and also leaves
      format attributes in order to detect similar mistakes at compile time.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5da444aa
    • C
      compat: fs: Generic compat_sys_sendfile implementation · 8f9c0119
      Catalin Marinas 提交于
      This function is used by sparc, powerpc and arm64 for compat support.
      The patch adds a generic implementation which calls do_sendfile()
      directly and avoids set_fs().
      
      The sparc architecture has wrappers for the sign extensions while
      powerpc relies on the compiler to do the this. The patch adds wrappers
      for powerpc to handle the u32->int type conversion.
      
      compat_sys_sendfile64() can be replaced by a sys_sendfile() call since
      compat_loff_t has the same size as off_t on a 64-bit system.
      
      On powerpc, the patch also changes the 64-bit sendfile call from
      sys_sendile64 to sys_sendfile.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      8f9c0119
    • D
      UAPI: Plumb the UAPI Kbuilds into the user header installation and checking · 10b63956
      David Howells 提交于
      Plumb the UAPI Kbuilds into the user header installation and checking system.
      As the headers are split the entries will be transferred across from the old
      Kbuild files to the UAPI Kbuild files.
      
      The changes made in this commit are:
      
       (1) Exported generated files (of which there are currently four) are moved to
           uapi/ directories under the appropriate generated/ directory, thus we
           get:
      
      	include/generated/uapi/linux/version.h
      	arch/x86/include/generated/uapi/asm/unistd_32.h
      	arch/x86/include/generated/uapi/asm/unistd_64.h
      	arch/x86/include/generated/uapi/asm/unistd_x32.h
      
           These paths were added to the build as -I flags in a previous patch.
      
       (2) scripts/Makefile.headersinst is now given the UAPI path to install from
           rather than the old path.
      
           It then determines the old path from that and includes that Kbuild also
           if it exists, thus permitting the headers to exist in either directory
           during the changeover.
      
           I also renamed the "install" variable to "installdir" as it refers to a
           directory not the install program.
      
       (3) scripts/headers_install.pl is altered to take a list of source file paths
           instead of just their names so that the makefile can tell it exactly
           where to find each file.
      
           For the moment, files can be obtained from one of four places for each
           output directory:
      
      	.../include/uapi/foo/
      	.../include/generated/uapi/foo/
      	.../include/foo/
      	.../include/generated/foo/
      
           The non-UAPI paths will be dropped later.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NDave Jones <davej@redhat.com>
      10b63956
    • D
      UAPI: x86: Differentiate the generated UAPI and internal headers · ec28b7f2
      David Howells 提交于
      Differentiate the generated UAPI and internal headers during generation such
      that the UAPI headers can be installed elsewhere.
      
      A later patch will use this to move the UAPI headers to:
      
      	arch/x86/include/generated/uapi/asm/
      
      to make them easier to handle.
      
      A previous patch added a -I for this path.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NDave Jones <davej@redhat.com>
      ec28b7f2
    • D
      UAPI: x86: Fix insn_sanity build failure after UAPI split · c0522b6c
      David Howells 提交于
      Fix a build failure in the x86 insn_sanity program after the UAPI split.  The
      problem is that insn_sanity.c #includes arch/x86/lib/insn.c - which uses the
      kernel string header.  This leads to conflicts for various definitions against
      the /usr/include/ headers.
      
      linux/string.h can be replaced with the normal userspace string.h if __KERNEL__
      is not specified.
      
        HOSTCC  arch/x86/tools/insn_sanity
      In file included from /data/fs/linux-2.6-hdr/include/linux/string.h:6:0,
                       from /data/fs/linux-2.6-hdr/arch/x86/lib/insn.c:21,
                       from arch/x86/tools/insn_sanity.c:36:
      /data/fs/linux-2.6-hdr/include/linux/types.h:14:26: error: conflicting types for 'fd_set'
      /usr/include/sys/select.h:76:5: note: previous declaration of 'fd_set' was here
      /data/fs/linux-2.6-hdr/include/linux/types.h:15:25: error: conflicting types for 'dev_t'
      /usr/include/sys/types.h:61:17: note: previous declaration of 'dev_t' was here
      /data/fs/linux-2.6-hdr/include/linux/types.h:25:26: error: conflicting types for 'timer_t'
      /usr/include/time.h:104:19: note: previous declaration of 'timer_t' was here
      /data/fs/linux-2.6-hdr/include/linux/types.h:45:26: error: conflicting types for 'loff_t'
      /usr/include/sys/types.h:45:18: note: previous declaration of 'loff_t' was here
      /data/fs/linux-2.6-hdr/include/linux/types.h:112:17: error: conflicting types for 'u_int64_t'
      /usr/include/sys/types.h:204:1: note: previous declaration of 'u_int64_t' was here
      /data/fs/linux-2.6-hdr/include/linux/types.h:113:17: error: conflicting types for 'int64_t'
      /usr/include/sys/types.h:198:1: note: previous declaration of 'int64_t' was here
      /data/fs/linux-2.6-hdr/include/linux/types.h:134:23: error: conflicting types for 'blkcnt_t'
      /usr/include/sys/types.h:236:20: note: previous declaration of 'blkcnt_t' was here
      In file included from /data/fs/linux-2.6-hdr/arch/x86/lib/insn.c:21:0,
                       from arch/x86/tools/insn_sanity.c:36:
      /data/fs/linux-2.6-hdr/include/linux/string.h:38:12: error: expected identifier or '(' before '__extension__'
      /data/fs/linux-2.6-hdr/include/linux/string.h:38:12: error: expected identifier or '(' before ')' token
      /data/fs/linux-2.6-hdr/include/linux/string.h:41:12: error: expected identifier or '(' before '__extension__'
      /data/fs/linux-2.6-hdr/include/linux/string.h:53:15: error: expected identifier or '(' before '__extension__'
      /data/fs/linux-2.6-hdr/include/linux/string.h:61:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'skip_spaces'
      /data/fs/linux-2.6-hdr/include/linux/string.h:65:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'char'
      /data/fs/linux-2.6-hdr/include/linux/string.h:83:15: error: expected identifier or '(' before '__extension__'
      /data/fs/linux-2.6-hdr/include/linux/string.h:83:15: error: expected identifier or '(' before ')' token
      /data/fs/linux-2.6-hdr/include/linux/string.h:86:15: error: expected identifier or '(' before '__extension__'
      /data/fs/linux-2.6-hdr/include/linux/string.h:86:15: error: expected identifier or '(' before ')' token
      /data/fs/linux-2.6-hdr/include/linux/string.h:89:24: error: expected identifier or '(' before '__extension__'
      /data/fs/linux-2.6-hdr/include/linux/string.h:89:24: error: expected identifier or '(' before ')' token
      /data/fs/linux-2.6-hdr/include/linux/string.h:92:24: error: expected identifier or '(' before '__extension__'
      /data/fs/linux-2.6-hdr/include/linux/string.h:92:24: error: expected identifier or '(' before ')' token
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NDave Jones <davej@redhat.com>
      c0522b6c
    • D
      UAPI: x86: Fix the test_get_len tool · 584c5ef8
      David Howells 提交于
      Fix the x86 test_get_len tool to have the right include paths in the right
      order (it includes a non-exported kernel header directly), otherwise errors
      like the following occur:
      
      /data/fs/linux-2.6-hdr/include/linux/types.h:18:26: error: conflicting types for 'fd_set'
      /usr/include/sys/select.h:78:5: note: previous declaration of 'fd_set' was here
      
      and
      
      /data/fs/linux-2.6-hdr/include/linux/string.h:42:12: error: expected identifier or '(' before '__extension__'
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NDave Jones <davej@redhat.com>
      584c5ef8
    • D
      UAPI: (Scripted) Set up UAPI Kbuild files · 4413e16d
      David Howells 提交于
      Set up empty UAPI Kbuild files to be populated by the header splitter.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NDave Jones <davej@redhat.com>
      4413e16d
    • D
      UAPI: Partition the header include path sets and add uapi/ header directories · abbf1590
      David Howells 提交于
      Partition the header include path flags into two sets, one for kernelspace
      builds and one for userspace builds.
      
      Add the following directories to build after the ordinary include directories
      so that #include will pick up the UAPI header directly if the kernel header
      has been moved there.
      
      The userspace set (represented by the USERINCLUDE make variable) contains:
      
      	-I $(srctree)/arch/$(hdr-arch)/include/uapi
      	-I arch/$(hdr-arch)/include/generated/uapi
      	-I $(srctree)/include/uapi
      	-I include/generated/uapi
      	-include $(srctree)/include/linux/kconfig.h
      
      and the kernelspace set (represented by the LINUXINCLUDE make variable)
      contains:
      
      	-I $(srctree)/arch/$(hdr-arch)/include
      	-I arch/$(hdr-arch)/include/generated
      	-I $(srctree)/include
      	-I include		--- if not building in the source tree
      
      plus everything in the USERINCLUDE set.
      
      Then use USERINCLUDE in building the x86 boot code.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NDave Jones <davej@redhat.com>
      abbf1590
    • D
      UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel system headers · a1ce3928
      David Howells 提交于
      Convert #include "..." to #include <path/...> in kernel system headers.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Acked-by: NDave Jones <davej@redhat.com>
      a1ce3928
  5. 02 10月, 2012 4 次提交