1. 18 Apr, 2014 4 commits
  2. 13 Apr, 2014 7 commits
    • Finn Thain's avatar
      m68k: Skip futex_atomic_cmpxchg_inatomic() test · 37f6d106
      Finn Thain authored
      commit e571c58f upstream.
      
      Skip the futex_atomic_cmpxchg_inatomic() test in futex_init(). It causes a
      fatal exception on 68030 (and presumably 68020 also).
      Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
      Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Link: http://lkml.kernel.org/r/alpine.LNX.2.00.1403061006440.5525@nippy.intranetSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      37f6d106
    • Heiko Carstens's avatar
      futex: Allow architectures to skip futex_atomic_cmpxchg_inatomic() test · cee41ea0
      Heiko Carstens authored
      commit 03b8c7b6 upstream.
      
      If an architecture has futex_atomic_cmpxchg_inatomic() implemented and there
      is no runtime check necessary, allow to skip the test within futex_init().
      
      This allows to get rid of some code which would always give the same result,
      and also allows the compiler to optimize a couple of if statements away.
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Finn Thain <fthain@telegraphics.com.au>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Link: http://lkml.kernel.org/r/20140302120947.GA3641@osirisSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      [geert: Backported to v3.10..v3.13]
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      cee41ea0
    • Paul Moore's avatar
      selinux: correctly label /proc inodes in use before the policy is loaded · 4a1bdd99
      Paul Moore authored
      commit f64410ec upstream.
      
      This patch is based on an earlier patch by Eric Paris, he describes
      the problem below:
      
        "If an inode is accessed before policy load it will get placed on a
         list of inodes to be initialized after policy load.  After policy
         load we call inode_doinit() which calls inode_doinit_with_dentry()
         on all inodes accessed before policy load.  In the case of inodes
         in procfs that means we'll end up at the bottom where it does:
      
           /* Default to the fs superblock SID. */
           isec->sid = sbsec->sid;
      
           if ((sbsec->flags & SE_SBPROC) && !S_ISLNK(inode->i_mode)) {
                   if (opt_dentry) {
                           isec->sclass = inode_mode_to_security_class(...)
                           rc = selinux_proc_get_sid(opt_dentry,
                                                     isec->sclass,
                                                     &sid);
                           if (rc)
                                   goto out_unlock;
                           isec->sid = sid;
                   }
           }
      
         Since opt_dentry is null, we'll never call selinux_proc_get_sid()
         and will leave the inode labeled with the label on the superblock.
         I believe a fix would be to mimic the behavior of xattrs.  Look
         for an alias of the inode.  If it can't be found, just leave the
         inode uninitialized (and pick it up later) if it can be found, we
         should be able to call selinux_proc_get_sid() ..."
      
      On a system exhibiting this problem, you will notice a lot of files in
      /proc with the generic "proc_t" type (at least the ones that were
      accessed early in the boot), for example:
      
         # ls -Z /proc/sys/kernel/shmmax | awk '{ print $4 " " $5 }'
         system_u:object_r:proc_t:s0 /proc/sys/kernel/shmmax
      
      However, with this patch in place we see the expected result:
      
         # ls -Z /proc/sys/kernel/shmmax | awk '{ print $4 " " $5 }'
         system_u:object_r:sysctl_kernel_t:s0 /proc/sys/kernel/shmmax
      
      Cc: Eric Paris <eparis@redhat.com>
      Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
      Acked-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      4a1bdd99
    • Sebastian Hesselbarth's avatar
      PCI: mvebu: move clock enable before register access · 5829b0e0
      Sebastian Hesselbarth authored
      commit b42285f6 upstream.
      
      The clock passed to PCI controller found on MVEBU SoCs may come from a
      clock gate. This requires the clock to be enabled before any registers
      are accessed. Therefore, move the clock enable before register iomap to
      ensure it is enabled.
      Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      5829b0e0
    • Mikulas Patocka's avatar
      powernow-k6: reorder frequencies · 204e4f25
      Mikulas Patocka authored
      commit 22c73795 upstream.
      
      This patch reorders reported frequencies from the highest to the lowest,
      just like in other frequency drivers.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      204e4f25
    • Mikulas Patocka's avatar
      powernow-k6: correctly initialize default parameters · b80bb221
      Mikulas Patocka authored
      commit d82b922a upstream.
      
      The powernow-k6 driver used to read the initial multiplier from the
      powernow register. However, there is a problem with this:
      
      * If there was a frequency transition before, the multiplier read from the
        register corresponds to the current multiplier.
      * If there was no frequency transition since reset, the field in the
        register always reads as zero, regardless of the current multiplier that
        is set using switches on the mainboard and that the CPU is running at.
      
      The zero value corresponds to multiplier 4.5, so as a consequence, the
      powernow-k6 driver always assumes multiplier 4.5.
      
      For example, if we have 550MHz CPU with bus frequency 100MHz and
      multiplier 5.5, the powernow-k6 driver thinks that the multiplier is 4.5
      and bus frequency is 122MHz. The powernow-k6 driver then sets the
      multiplier to 4.5, underclocking the CPU to 450MHz, but reports the
      current frequency as 550MHz.
      
      There is no reliable way how to read the initial multiplier. I modified
      the driver so that it contains a table of known frequencies (based on
      parameters of existing CPUs and some common overclocking schemes) and sets
      the multiplier according to the frequency. If the frequency is unknown
      (because of unusual overclocking or underclocking), the user must supply
      the bus speed and maximum multiplier as module parameters.
      
      This patch should be backported to all stable kernels. If it doesn't
      apply cleanly, change it, or ask me to change it.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      b80bb221
    • Mikulas Patocka's avatar
      powernow-k6: disable cache when changing frequency · 3389f243
      Mikulas Patocka authored
      commit e20e1d0a upstream.
      
      I found out that a system with k6-3+ processor is unstable during network
      server load. The system locks up or the network card stops receiving. The
      reason for the instability is the CPU frequency scaling.
      
      During frequency transition the processor is in "EPM Stop Grant" state.
      The documentation says that the processor doesn't respond to inquiry
      requests in this state. Consequently, coherency of processor caches and
      bus master devices is not maintained, causing the system instability.
      
      This patch flushes the cache during frequency transition. It fixes the
      instability.
      
      Other minor changes:
      * u64 invalue changed to unsigned long because the variable is 32-bit
      * move the logic to set the multiplier to a separate function
        powernow_k6_set_cpu_multiplier
      * preserve lower 5 bits of the powernow port instead of 4 (the voltage
        field has 5 bits)
      * mask interrupts when reading the multiplier, so that the port is not
        open during other activity (running other kernel code with the port open
        shouldn't cause any misbehavior, but we should better be safe and keep
        the port closed)
      
      This patch should be backported to all stable kernels. If it doesn't
      apply cleanly, change it, or ask me to change it.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      3389f243
  3. 03 Apr, 2014 29 commits