1. 07 May, 2013 3 commits
    • Helge Deller's avatar
      parisc: implement irq stacks · 200c8804
      Helge Deller authored
      
      Default kernel stack size on parisc is 16k.  During tests we found that the
      kernel stack can easily grow beyond 13k, which leaves 3k left for irq
      processing.
      
      This patch adds the possibility to activate an additional stack of 16k per CPU
      which is being used during irq processing.  This implementation does not yet
      uses this irq stack for the irq bh handler.
      
      The assembler code for call_on_stack was heavily cleaned up by John
      David Anglin.
      
      CC: John David Anglin <dave.anglin@bell.net>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      200c8804
    • Helge Deller's avatar
      parisc: add kernel stack overflow check · 9372450c
      Helge Deller authored
      
      Add the CONFIG_DEBUG_STACKOVERFLOW config option to enable checks to
      detect kernel stack overflows.
      
      Stack overflows can not be detected reliable since we do not want to
      introduce too much overhead.
      
      Instead, during irq processing in do_cpu_irq_mask() we check kernel
      stack usage of the interrupted kernel process. Kernel threads can be
      easily detected by checking the value of space register 7 (sr7) which
      is zero when running inside the kernel.
      
      Since THREAD_SIZE is 16k and PAGE_SIZE is 4k, reduce the alignment of
      the init thread to the lower value (PAGE_SIZE) in the kernel
      vmlinux.ld.S linker script.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      9372450c
    • John David Anglin's avatar
      parisc: only re-enable interrupts if we need to schedule or deliver signals... · c207a76b
      John David Anglin authored
      parisc: only re-enable interrupts if we need to schedule or deliver signals when returning to userspace
      
      Helge and I have found that we have a kernel stack overflow problem
      which causes a variety of random failures.
      Currently, we re-enable interrupts when returning from an external
      interrupt incase we need to schedule or delivery
      signals.  As a result, a potentially unlimited number of interrupts
      can occur while we are running on the kernel
      stack.  It is very limited in space (currently, 16k).  This change
      defers enabling interrupts until we have
      actually decided to schedule or delivery signals.  This only occurs
      when we about to return to userspace.  This
      limits the number of interrupts on the kernel stack to one.  In other
      cases, interrupts remain disabled until the
      final return from interrupt (rfi).
      Signed-off-by: default avatarJohn David Anglin  <dave.anglin@bell.net>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      c207a76b
  2. 06 May, 2013 9 commits
    • Helge Deller's avatar
      parisc: implement atomic64_dec_if_positive() · f21dda02
      Helge Deller authored
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      f21dda02
    • John David Anglin's avatar
      parisc: use long branch in fork_like macro · bbbfde78
      John David Anglin authored
      
      The "b" branch instruction used in the fork_like macro only can handle
      17-bit pc-relative offsets.
      This fails with an out of range offset with some .config files.
      Rewrite to use the "be" instruction which
      can branch to any address in a space.
      Signed-off-by: default avatarJohn David Anglin  <dave.anglin@bell.net>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      bbbfde78
    • Mike Frysinger's avatar
      parisc: fix NATIVE set up in build · 93782eba
      Mike Frysinger authored
      
      The ifeq operator does not accept globs, so this little bit of code will
      never match (unless uname literally prints out "parsic*").  Rewrite to
      use a pattern matching operator so that NATIVE is set to 1 on parisc.
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      93782eba
    • Helge Deller's avatar
      parisc: document the parisc gateway page · dde39798
      Helge Deller authored
      
      Include some documentation about how the parisc gateway page technically
      works and how it is used from userspace.
      
      James Bottomley is the original author of this description and it was
      copied here out of an email thread from Apr 12 2013 titled:
      man2 : syscall.2 : document syscall calling conventions
      
      CC: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      dde39798
    • Helge Deller's avatar
      parisc: fix partly 16/64k PAGE_SIZE boot · 6a45716a
      Helge Deller authored
      
      This patch fixes partly PAGE_SIZEs of 16K or 64K by adjusting the
      assembler PTE lookup code and the assembler TEMPALIAS code.  Furthermore
      some data alignments for PAGE_SIZE have been limited to 4K (or less) to
      not waste too much memory with greater page sizes. As a side note, the
      palo loader can (currently) only handle up to 10 ELF segments which is
      fixed with tighter aligning as well.
      
      My testings indicated that the ldci command in the sba iommu coding
      needed adjustment by the PAGE_SHIFT value and that the I/O PDIR Page
      size was only set to 4K for my machine (C3000).
      
      All this fixes partly the boot, but there are still quite some caching
      problems left.  Examples are e.g. the symbios logic driver which is
      failing:
      
      sym0: <896> rev 0x7 at pci 0000:00:0f.0 irq 69
      sym0: PA-RISC Firmware, ID 7, Fast-40, SE, parity checking
      CACHE TEST FAILED: DMA error (dstat=0x81).sym0: CACHE INCORRECTLY CONFIGURED.
      
      and the tulip network driver which doesn't seem to work correctly
      either:
      
      Sending BOOTP requests .net eth0: Setting full-duplex based on MII#1
      link partner capability of 05e1
      ..... timed out!
      
      Beside those kernel fixes glibc will need fixes too to be able to handle
      >4K page sizes.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      6a45716a
    • Damian Hobson-Garcia's avatar
      parisc: Provide default implementation for dma_{alloc, free}_attrs · 7f64fb41
      Damian Hobson-Garcia authored
      
      Most architectures that define CONFIG_HAVE_DMA, have implementations for
      both dma_alloc_attrs() and dma_free_attrs().  All achitectures that do
      not define CONFIG_HAVE_DMA also have both of these definitions provided by
      dma-mapping-broken.h.
      
      Add default implementations for these functions on parisc.
      Signed-off-by: default avatarDamian Hobson-Garcia <dhobsong@igel.co.jp>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      7f64fb41
    • Rolf Eike Beer's avatar
      parisc: fix whitespace errors in arch/parisc/kernel/traps.c · a39e6bea
      Rolf Eike Beer authored
      
      Things like " \t" and whitespace at end of line. I'm leaving all the other
      coding style errors here alone.
      Signed-off-by: default avatarRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      a39e6bea
    • Zhao Hongjiang's avatar
      parisc: remove the second argument of kmap_atomic · ba969c44
      Zhao Hongjiang authored
      
      kmap_atomic allows only one argument now, just move the second.
      Signed-off-by: default avatarZhao Hongjiang <zhaohongjiang@huawei.com>
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      ba969c44
    • Linus Torvalds's avatar
      Merge tag 'mfd-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next · d7ab7302
      Linus Torvalds authored
      Pull MFD update from Samuel Ortiz:
       "For 3.10 we have a few new MFD drivers for:
      
         - The ChromeOS embedded controller which provides keyboard, battery
           and power management services.  This controller is accessible
           through i2c or SPI.
      
         - Silicon Laboratories 476x controller, providing access to their FM
           chipset and their audio codec.
      
         - Realtek's RTS5249, a memory stick, MMC and SD/SDIO PCI based
           reader.
      
         - Nokia's Tahvo power button and watchdog device.  This device is
           very similar to Retu and is thus supported by the same code base.
      
         - STMicroelectronics STMPE1801, a keyboard and GPIO controller
           supported by the stmpe driver.
      
         - ST-Ericsson AB8540 and AB8505 power management and voltage
           converter controllers through the existing ab8500 code.
      
        Some other drivers got cleaned up or improved.  In particular:
      
         - The Linaro/STE guys got the ab8500 driver in sync with their
           internal code through a series of optimizations, fixes and
           improvements.
      
         - The AS3711 and OMAP USB drivers now have DT support.
      
         - The arizona clock and interrupt handling code got improved.
      
         - The wm5102 register patch and boot mechanism also got improved."
      
      * tag 'mfd-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (104 commits)
        mfd: si476x: Don't use 0bNNN
        mfd: vexpress: Handle pending config transactions
        mfd: ab8500: Export ab8500_gpadc_sw_hw_convert properly
        mfd: si476x: Fix i2c warning
        mfd: si476x: Add header files and Kbuild plumbing
        mfd: si476x: Add chip properties handling code
        mfd: si476x: Add the bulk of the core driver
        mfd: si476x: Add commands abstraction layer
        mfd: rtsx: Support RTS5249
        mfd: retu: Add Tahvo support
        mfd: ucb1400: Pass ucb1400-gpio data through ac97 bus
        mfd: wm8994: Add some OF properties
        mfd: wm8994: Add device ID data to WM8994 OF device IDs
        input: Export matrix_keypad_parse_of_params()
        mfd: tps65090: Add compatible string for charger subnode
        mfd: db8500-prcmu: Support platform dependant device selection
        mfd: syscon: Fix warnings when printing resource_size_t
        of: Add stub of_get_parent for non-OF builds
        mfd: omap-usb-tll: Convert to devm_ioremap_resource()
        mfd: omap-usb-host: Convert to devm_ioremap_resource()
        ...
      d7ab7302
  3. 05 May, 2013 28 commits