1. 03 May, 2012 4 commits
    • Mai La's avatar
      powerpc/44x: Fix PCI MSI support for Maui APM821xx SoC and Bluestone board · 247540b0
      Mai La authored
      This patch consists of:
      - Enable PCI MSI as default for Bluestone board
      - Change definition of number of MSI interrupts as it depends on SoC
      - Fix returning ENODEV as finding MSI node
      - Fix MSI physical high and low address
      - Keep MSI data logically
      Signed-off-by: default avatarMai La <mla@apm.com>
      Signed-off-by: default avatarJosh Boyer <jwboyer@gmail.com>
      247540b0
    • Suzuki Poulose's avatar
      powerpc/47x: Enable CRASH_DUMP · 47da4219
      Suzuki Poulose authored
      Now that we have KEXEC and relocatable kernel working on 47x (!SMP)
      enable CRASH_DUMP.
      Signed-off-by: default avatarSuzuki K. Poulose <suzuki@in.ibm.com>
      Signed-off-by: default avatarJosh Boyer <jwboyer@gmail.com>
      47da4219
    • Suzuki Poulose's avatar
      powerpc/47x: Kernel support for KEXEC · 68343020
      Suzuki Poulose authored
      This patch adds support for creating 1:1 mapping for the PPC_47x during
      a KEXEC. The implementation is similar to that of the PPC440x which is
      described here :
      
      	http://patchwork.ozlabs.org/patch/104323/
      
      PPC_47x MMU :
      
      The 47x uses Unified TLB 1024 entries, with 4-way associative mapping
      (4 x 256 entries). The index to be used is calculated by the MMU by
      hashing the PID, EPN and TS. The software can choose to specify the way
      by setting bit 0(enable way select) and the way in bits 1-2 in the TLB
      Word 0.
      
      Implementation:
      
      The patch erases all the UTLB entries which includes the tlb covering
      the mapping for our code. The shadow TLB caches the mapping for the
      running code which helps us to continue the execution until we do
      isync/rfi. We then create a tmp mapping for the current code in the
      other address space (TS) and switch to it.
      
      Then we create a 1:1 mapping(EPN=RPN) for 0-2GiB in the original
      address space and switch to the new mapping.
      
      TODO: Add SMP support.
      Signed-off-by: default avatarSuzuki K. Poulose <suzuki@in.ibm.com>
      Signed-off-by: default avatarJosh Boyer <jwboyer@gmail.com>
      68343020
    • Suzuki Poulose's avatar
      powerpc/44x: Fix/Initialize PID to kernel PID before the TLB search · f13bfcc6
      Suzuki Poulose authored
      Initialize the PID register with kernel pid (0) before we start
      setting the TLB mapping for KEXEC. Also set the MMUCR[TID] to kernel
      PID.
      
      This was spotted while testing the kexec on ISS for 47x. ISS  doesn't
      return a successful tlbsx for a kernel address with PID set to a user PID.
      Though the hardware/qemu/simics work fine.
      
      This patch is harmless and initializes the PID to 0 (kernel PID) which
      is usually the case during a normal kernel boot. This would fix the kexec
      on ISS for 440. I have tested this patch on sequoia board.
      Signed-off-by: default avatarSuzuki K Poulose <suzuki@in.ibm.com>
      Cc: Josh Boyer <jwboyer@gmail.com>
      Signed-off-by: default avatarJosh Boyer <jwboyer@gmail.com>
      f13bfcc6
  2. 30 Apr, 2012 30 commits
  3. 29 Apr, 2012 6 commits
    • Linus Torvalds's avatar
      Linux 3.4-rc5 · 69964ea4
      Linus Torvalds authored
      69964ea4
    • Linus Torvalds's avatar
      Merge tag 'pm-for-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 6cfdd02b
      Linus Torvalds authored
      Pull power management fixes from Rafael J. Wysocki:
       "Fix for an issue causing hibernation to hang on systems with highmem
        (that practically means i386) due to broken memory management (bug
        introduced in 3.2, so -stable material) and PM documentation update
        making the freezer documentation follow the code again after some
        recent updates."
      
      * tag 'pm-for-3.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / Freezer / Docs: Update documentation about freezing of tasks
        PM / Hibernate: fix the number of pages used for hibernate/thaw buffering
      6cfdd02b
    • Linus Torvalds's avatar
      autofs: make the autofsv5 packet file descriptor use a packetized pipe · 64f371bc
      Linus Torvalds authored
      The autofs packet size has had a very unfortunate size problem on x86:
      because the alignment of 'u64' differs in 32-bit and 64-bit modes, and
      because the packet data was not 8-byte aligned, the size of the autofsv5
      packet structure differed between 32-bit and 64-bit modes despite
      looking otherwise identical (300 vs 304 bytes respectively).
      
      We first fixed that up by making the 64-bit compat mode know about this
      problem in commit a32744d4 ("autofs: work around unhappy compat
      problem on x86-64"), and that made a 32-bit 'systemd' work happily on a
      64-bit kernel because everything then worked the same way as on a 32-bit
      kernel.
      
      But it turned out that 'automount' had actually known and worked around
      this problem in user space, so fixing the kernel to do the proper 32-bit
      compatibility handling actually *broke* 32-bit automount on a 64-bit
      kernel, because it knew that the packet sizes were wrong and expected
      those incorrect sizes.
      
      As a result, we ended up reverting that compatibility mode fix, and
      thus breaking systemd again, in commit fcbf94b9.
      
      With both automount and systemd doing a single read() system call, and
      verifying that they get *exactly* the size they expect but using
      different sizes, it seemed that fixing one of them inevitably seemed to
      break the other.  At one point, a patch I seriously considered applying
      from Michael Tokarev did a "strcmp()" to see if it was automount that
      was doing the operation.  Ugly, ugly.
      
      However, a prettier solution exists now thanks to the packetized pipe
      mode.  By marking the communication pipe as being packetized (by simply
      setting the O_DIRECT flag), we can always just write the bigger packet
      size, and if user-space does a smaller read, it will just get that
      partial end result and the extra alignment padding will simply be thrown
      away.
      
      This makes both automount and systemd happy, since they now get the size
      they asked for, and the kernel side of autofs simply no longer needs to
      care - it could pad out the packet arbitrarily.
      
      Of course, if there is some *other* user of autofs (please, please,
      please tell me it ain't so - and we haven't heard of any) that tries to
      read the packets with multiple writes, that other user will now be
      broken - the whole point of the packetized mode is that one system call
      gets exactly one packet, and you cannot read a packet in pieces.
      Tested-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: David Miller <davem@davemloft.net>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Thomas Meyer <thomas@m3y3r.de>
      Cc: stable@kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      64f371bc
    • Marcos Paulo de Souza's avatar
      PM / Freezer / Docs: Update documentation about freezing of tasks · 26e0f90f
      Marcos Paulo de Souza authored
      The file Documentation/power/freezing-of-tasks.txt was still referencing
      the TIF_FREEZE flag, that was removed by the commit
      d88e4cb6(freezer: remove now unused
      TIF_FREEZE).
      
      This patch removes all the references of TIF_FREEZE that were left
      behind.
      Signed-off-by: default avatarMarcos Paulo de Souza <marcos.souza.org@gmail.com>
      Signed-off-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
      26e0f90f
    • Linus Torvalds's avatar
      pipes: add a "packetized pipe" mode for writing · 9883035a
      Linus Torvalds authored
      The actual internal pipe implementation is already really about
      individual packets (called "pipe buffers"), and this simply exposes that
      as a special packetized mode.
      
      When we are in the packetized mode (marked by O_DIRECT as suggested by
      Alan Cox), a write() on a pipe will not merge the new data with previous
      writes, so each write will get a pipe buffer of its own.  The pipe
      buffer is then marked with the PIPE_BUF_FLAG_PACKET flag, which in turn
      will tell the reader side to break the read at that boundary (and throw
      away any partial packet contents that do not fit in the read buffer).
      
      End result: as long as you do writes less than PIPE_BUF in size (so that
      the pipe doesn't have to split them up), you can now treat the pipe as a
      packet interface, where each read() system call will read one packet at
      a time.  You can just use a sufficiently big read buffer (PIPE_BUF is
      sufficient, since bigger than that doesn't guarantee atomicity anyway),
      and the return value of the read() will naturally give you the size of
      the packet.
      
      NOTE! We do not support zero-sized packets, and zero-sized reads and
      writes to a pipe continue to be no-ops.  Also note that big packets will
      currently be split at write time, but that the size at which that
      happens is not really specified (except that it's bigger than PIPE_BUF).
      Currently that limit is the system page size, but we might want to
      explicitly support bigger packets some day.
      
      The main user for this is going to be the autofs packet interface,
      allowing us to stop having to care so deeply about exact packet sizes
      (which have had bugs with 32/64-bit compatibility modes).  But user
      space can create packetized pipes with "pipe2(fd, O_DIRECT)", which will
      fail with an EINVAL on kernels that do not support this interface.
      Tested-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: David Miller <davem@davemloft.net>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Thomas Meyer <thomas@m3y3r.de>
      Cc: stable@kernel.org  # needed for systemd/autofs interaction fix
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9883035a
    • Linus Torvalds's avatar
      Merge tag 'staging-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · de9e24ed
      Linus Torvalds authored
      Pull staging tree fixes from Greg Kroah-Hartman:
       "Here are some tiny drivers/staging/ bugfixes.  Some build fixes that
        were recently reported, as well as one kfree bug that is hitting a
        number of users."
      
      * tag 'staging-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: ozwpan: Fix bug where kfree is called twice.
        staging: octeon-ethernet: fix build errors by including interrupt.h
        staging: zcache: fix Kconfig crypto dependency
        staging: tidspbridge: remove usage of OMAP2_L4_IO_ADDRESS
      de9e24ed