1. 18 12月, 2013 2 次提交
  2. 01 12月, 2013 6 次提交
  3. 30 11月, 2013 3 次提交
    • R
      ARM: footbridge: fix VGA initialisation · 43659222
      Russell King 提交于
      It's no good setting vga_base after the VGA console has been
      initialised, because if we do that we get this:
      
      Unable to handle kernel paging request at virtual address 000b8000
      pgd = c0004000
      [000b8000] *pgd=07ffc831, *pte=00000000, *ppte=00000000
      0Internal error: Oops: 5017 [#1] ARM
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.0+ #49
      task: c03e2974 ti: c03d8000 task.ti: c03d8000
      PC is at vgacon_startup+0x258/0x39c
      LR is at request_resource+0x10/0x1c
      pc : [<c01725d0>]    lr : [<c0022b50>]    psr: 60000053
      sp : c03d9f68  ip : 000b8000  fp : c03d9f8c
      r10: 000055aa  r9 : 4401a103  r8 : ffffaa55
      r7 : c03e357c  r6 : c051b460  r5 : 000000ff  r4 : 000c0000
      r3 : 000b8000  r2 : c03e0514  r1 : 00000000  r0 : c0304971
      Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
      
      which is an access to the 0xb8000 without the PCI offset required to
      make it work.
      
      Fixes: cc22b4c1 ("ARM: set vga memory base at run-time")
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: <stable@vger.kernel.org>
      43659222
    • R
      ARM: fix booting low-vectors machines · d8aa712c
      Russell King 提交于
      Commit f6f91b0d (ARM: allow kuser helpers to be removed from the
      vector page) required two pages for the vectors code.  Although the
      code setting up the initial page tables was updated, the code which
      allocates page tables for new processes wasn't, neither was the code
      which tears down the mappings.  Fix this.
      
      Fixes: f6f91b0d ("ARM: allow kuser helpers to be removed from the vector page")
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: <stable@vger.kernel.org>
      d8aa712c
    • R
      ARM: dma-mapping: check DMA mask against available memory · 11a5aa32
      Russell King 提交于
      Some buses have negative offsets, which causes the DMA mask checks to
      falsely fail.  Fix this by using the actual amount of memory fitted in
      the system.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      11a5aa32
  4. 29 11月, 2013 4 次提交
  5. 26 11月, 2013 7 次提交
  6. 25 11月, 2013 9 次提交
    • M
      s390/mm: handle asce-type exceptions as normal page fault · 127581b6
      Martin Schwidefsky 提交于
      Git commit 9e34f2686bb088b211b6cac8772e1f644c6180f8
      "s390/mm,tlb: tlb flush on page table upgrade fixup" removed the
      exception handler for the asce-type exception. This is incorrect
      as the user-copy with MVCOS can cause asce-type exceptions in
      the kernel if a user pointer is too large. Those need to be
      handled with do_no_context to branch to the fixup in the
      user-copy code.
      
      The simplest fix for this problem is to call do_dat_exception for
      asce-type excpetions, as there is no vma for the address the code
      will handle the exception correctly.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      127581b6
    • M
      s390,time: revert direct ktime path for s390 clockevent device · 8adbf78e
      Martin Schwidefsky 提交于
      Git commit 4f37a68c
      "s390: Use direct ktime path for s390 clockevent device" makes use
      of the CLOCK_EVT_FEAT_KTIME clockevent option to avoid the delta
      calculation with ktime_get() in clockevents_program_event and the
      get_tod_clock() in s390_next_event. This is based on the assumption
      that the difference between the internal ktime and the hardware
      clock is reflected in the wall_to_monotonic delta. But this is not
      true, the ntp corrections are applied via changes to the tk->mult
      multiplier and this is not reflected in wall_to_monotonic.
      
      In theory this could be solved by using the raw monotonic clock
      but it is simpler to switch back to the standard clock delta
      calculation.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      8adbf78e
    • M
      s390/time,vdso: convert to the new update_vsyscall interface · 79c74ecb
      Martin Schwidefsky 提交于
      Switch to the improved update_vsyscall interface that provides
      sub-nanosecond precision for gettimeofday and clock_gettime.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      79c74ecb
    • H
      s390/uaccess: add missing page table walk range check · 71a86ef0
      Heiko Carstens 提交于
      When translating a user space address, the address must be checked against
      the ASCE limit of the process. If the address is larger than the maximum
      address that is reachable with the ASCE, an ASCE type exception must be
      generated.
      
      The current code simply ignored the higher order bits. This resulted in an
      address wrap around in user space instead of an exception in user space.
      
      Cc: stable@vger.kernel.org # v3.9+
      Reviewed-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      71a86ef0
    • C
      arch/powerpc/kernel: Use %12.12s instead of %12s to avoid memory overflow · e0513d9e
      Chen Gang 提交于
      for tmp_part->header.name:
          it is "Terminating null required only for names < 12 chars".
          so need to limit the %.12s for it in printk
      
        additional info:
      
          %12s  limit the width, not for the original string output length
                if name length is more than 12, it still can be fully displayed.
                if name length is less than 12, the ' ' will be filled before name.
      
          %.12s truly limit the original string output length (precision)
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e0513d9e
    • M
      powerpc/signals: Improved mark VSX not saved with small contexts fix · ec67ad82
      Michael Neuling 提交于
      In a recent patch:
        commit c13f20ac
        Author: Michael Neuling <mikey@neuling.org>
        powerpc/signals: Mark VSX not saved with small contexts
      
      We fixed an issue but an improved solution was later discussed after the patch
      was merged.
      
      Firstly, this patch doesn't handle the 64bit signals case, which could also hit
      this issue (but has never been reported).
      
      Secondly, the original patch isn't clear what MSR VSX should be set to.  The
      new approach below always clears the MSR VSX bit (to indicate no VSX is in the
      context) and sets it only in the specific case where VSX is available (ie. when
      VSX has been used and the signal context passed has space to provide the
      state).
      
      This reverts the original patch and replaces it with the improved solution.  It
      also adds a 64 bit version.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ec67ad82
    • H
      powerpc/kdump: Adding symbols in vmcoreinfo to facilitate dump filtering · 8ff81271
      Hari Bathini 提交于
      When CONFIG_SPARSEMEM_VMEMMAP option is used in kernel, makedumpfile fails
      to filter vmcore dump as it fails to do vmemmap translations. So far
      dump filtering on ppc64 never had to deal with vmemmap addresses seperately
      as vmemmap regions where mapped in zone normal. But with the inclusion of
      CONFIG_SPARSEMEM_VMEMMAP config option in kernel, this vmemmap address
      translation support becomes necessary for dump filtering. For vmemmap adress
      translation, few kernel symbols are needed by dump filtering tool. This patch
      adds those symbols to vmcoreinfo, which a dump filtering tool can use for
      filtering the kernel dump. Tested this changes successfully with makedumpfile
      tool that supports vmemmap to physical address translation outside zone normal.
      
      [ Removed unneeded #ifdef as suggested by Michael Ellerman --BenH ]
      Signed-off-by: NHari Bathini <hbathini@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      8ff81271
    • A
      powerpc: allyesconfig should not select CONFIG_CPU_LITTLE_ENDIAN · 962bc221
      Anton Blanchard 提交于
      Stephen reported a failure in an allyesconfig build.
      CONFIG_CPU_LITTLE_ENDIAN=y gets set but his toolchain is not
      new enough to support little endian. We really want to
      default to a big endian build; Ben suggested using a choice
      which defaults to CPU_BIG_ENDIAN.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      962bc221
    • M
      powerpc: Fix error when cross building TAGS & cscope · 924dd50b
      Michael Neuling 提交于
      Currently if I cross build TAGS or cscope from x86 I get this:
        % make ARCH=powerpc TAGS
        gcc-4.8.real: error: unrecognized command line option ‘-mbig-endian’
        GEN     TAGS
        %
      
      I'm not setting CROSS_COMPILE= as logically I shouldn't need to and I
      haven't needed to in the past when building TAGS or cscope.  Also, the
      above completess correct as the error is not fatal to the build.
      
      This was caused by:
          commit d72b0801
          Author: Ian Munsie <imunsie@au1.ibm.com>
          powerpc: Add ability to build little endian kernels
      
      The below fixes this by testing for the -mbig-endian option before
      adding it.
      
      I've not done the same thing in the little endian case as if
      -mlittle-endian doesn't exist, we probably want to fail quickly as you
      probably have an old big endian compiler.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      924dd50b
  7. 23 11月, 2013 4 次提交
  8. 22 11月, 2013 1 次提交
  9. 21 11月, 2013 4 次提交
    • M
      powerpc/signals: Mark VSX not saved with small contexts · c13f20ac
      Michael Neuling 提交于
      The VSX MSR bit in the user context indicates if the context contains VSX
      state.  Currently we set this when the process has touched VSX at any stage.
      
      Unfortunately, if the user has not provided enough space to save the VSX state,
      we can't save it but we currently still set the MSR VSX bit.
      
      This patch changes this to clear the MSR VSX bit when the user doesn't provide
      enough space.  This indicates that there is no valid VSX state in the user
      context.
      
      This is needed to support get/set/make/swapcontext for applications that use
      VSX but only provide a small context.  For example, getcontext in glibc
      provides a smaller context since the VSX registers don't need to be saved over
      the glibc function call.  But since the program calling getcontext may have
      used VSX, the kernel currently says the VSX state is valid when it's not.  If
      the returned context is then used in setcontext (ie. a small context without
      VSX but with MSR VSX set), the kernel will refuse the context.  This situation
      has been reported by the glibc community.
      
      Based on patch from Carlos O'Donell.
      Tested-by: NHaren Myneni <haren@linux.vnet.ibm.com>
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c13f20ac
    • M
      powerpc/pseries: Fix SMP=n build of rng.c · 148924f7
      Michael Ellerman 提交于
      In commit a489043f "Implement arch_get_random_long() based on H_RANDOM" I
      broke the SMP=n build. We were getting plpar_wrappers.h via spinlock.h
      which breaks when SMP=n.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      148924f7
    • M
      powerpc: Make cpu_to_chip_id() available when SMP=n · 3eb906c6
      Michael Ellerman 提交于
      Up until now we have only used cpu_to_chip_id() in the topology code,
      which is only used on SMP builds. However my recent commit a4da0d50
      "Implement arch_get_random_long/int() for powernv" added a usage when
      SMP=n, breaking the build.
      
      Move cpu_to_chip_id() into prom.c so it is available for SMP=n builds.
      
      We would move the extern to prom.h, but that breaks the include in
      topology.h. Instead we leave it in smp.h, but move it out of the
      CONFIG_SMP #ifdef. We also need to include asm/smp.h in rng.c, because
      the linux version skips asm/smp.h on UP. What a mess.
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3eb906c6
    • L
      powerpc/vio: Fix a dma_mask issue of vio · c6102609
      Li Zhong 提交于
      I encountered following issue:
      [    0.283035] ibmvscsi 30000015: couldn't initialize event pool
      [    5.688822] ibmvscsi: probe of 30000015 failed with error -1
      
      which prevents the storage from being recognized, and the machine from
      booting.
      
      After some digging, it seems that it is caused by commit 4886c399
      
      as dma_mask pointer in viodev->dev is not set, so in
      dma_set_mask_and_coherent(), dma_set_coherent_mask() is not called
      because dma_set_mask(), which is dma_set_mask_pSeriesLP() returned EIO.
      While before the commit, dma_set_coherent_mask() is always called.
      
      I tried to replace dma_set_mask_and_coherent() with
      dma_coerce_mask_and_coherent(), and the machine could boot again.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c6102609