1. 16 8月, 2011 3 次提交
    • D
      sparc64: Set HAVE_C_RECORDMCOUNT · 178a2960
      David S. Miller 提交于
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      178a2960
    • M
      sparc32: unbreak arch_write_unlock() · 3f6aa0b1
      Mikael Pettersson 提交于
      The sparc32 version of arch_write_unlock() is just a plain assignment.
      Unfortunately this allows the compiler to schedule side-effects in a
      protected region to occur after the HW-level unlock, which is broken.
      E.g., the following trivial test case gets miscompiled:
      
      	#include <linux/spinlock.h>
      	rwlock_t lock;
      	int counter;
      	void foo(void) { write_lock(&lock); ++counter; write_unlock(&lock); }
      
      Fixed by adding a compiler memory barrier to arch_write_unlock().  The
      sparc64 version combines the barrier and assignment into a single asm(),
      and implements the operation as a static inline, so that's what I did too.
      
      Compile-tested with sparc32_defconfig + CONFIG_SMP=y.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f6aa0b1
    • M
      sparc64: remove unnecessary macros from spinlock_64.h · a0fba3eb
      Mikael Pettersson 提交于
      The sparc64 spinlock_64.h contains a number of operations defined
      first as static inline functions, and then as macros with the same
      names and parameters as the functions.  Maybe this was needed at
      some point in the past, but now nothing seems to depend on these
      macros (checked with a recursive grep looking for ifdefs on these
      names).  Other archs don't define these identity-macros.
      
      So this patch deletes these unnecessary macros.
      
      Compile-tested with sparc64_defconfig.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0fba3eb
  2. 12 8月, 2011 1 次提交
  3. 06 8月, 2011 1 次提交
  4. 05 8月, 2011 2 次提交
  5. 04 8月, 2011 2 次提交
  6. 03 8月, 2011 7 次提交
  7. 31 7月, 2011 2 次提交
  8. 29 7月, 2011 1 次提交
    • D
      sparc: Sanitize cpu feature detection and reporting. · ac85fe8b
      David S. Miller 提交于
      Instead of evaluating the cpu features for ELF_HWCAP every exec,
      calculate it once at boot time.
      
      Add AV_SPARC_* capability flag bits, compatible with what Solaris
      reports to applications.
      
      Report these capabilities once in the kernel log, and also via
      /proc/cpuinfo in a new "cpucaps" entry.
      
      If available, fetch the cpu features from the machine description
      'hwcap-list' property of the 'cpu' node.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac85fe8b
  9. 28 7月, 2011 5 次提交
  10. 27 7月, 2011 5 次提交
  11. 26 7月, 2011 4 次提交
  12. 24 7月, 2011 1 次提交
  13. 22 7月, 2011 2 次提交
    • R
      PCI: Make the struct pci_dev * argument of pci_fixup_irqs const. · d5341942
      Ralf Baechle 提交于
      Aside of the usual motivation for constification,  this function has a
      history of being abused a hook for interrupt and other fixups so I turned
      this function const ages ago in the MIPS code but it should be done
      treewide.
      
      Due to function pointer passing in varous places a few other functions
      had to be constified as well.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      To: Anton Vorontsov <avorontsov@mvista.com>
      To: Chris Metcalf <cmetcalf@tilera.com>
      To: Colin Cross <ccross@android.com>
      Acked-by: N"David S. Miller" <davem@davemloft.net>
      To: Eric Miao <eric.y.miao@gmail.com>
      To: Erik Gilling <konkers@android.com>
      Acked-by: NGuan Xuetao <gxt@mprc.pku.edu.cn>
      To: "H. Peter Anvin" <hpa@zytor.com>
      To: Imre Kaloz <kaloz@openwrt.org>
      To: Ingo Molnar <mingo@redhat.com>
      To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      To: Jesse Barnes <jbarnes@virtuousgeek.org>
      To: Krzysztof Halasa <khc@pm.waw.pl>
      To: Lennert Buytenhek <kernel@wantstofly.org>
      To: Matt Turner <mattst88@gmail.com>
      To: Nicolas Pitre <nico@fluxnic.net>
      To: Olof Johansson <olof@lixom.net>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      To: Richard Henderson <rth@twiddle.net>
      To: Russell King <linux@arm.linux.org.uk>
      To: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-alpha@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-mips@linux-mips.org
      Cc: linux-pci@vger.kernel.org
      Cc: linux-sh@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      Cc: sparclinux@vger.kernel.org
      Cc: x86@kernel.org
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      d5341942
    • J
      sparc,kgdbts: fix compile regression with kgdb test suite · 33d8881a
      Jason Wessel 提交于
      Commit 63ab25eb (kgdbts: unify/generalize gdb breakpoint adjustment)
      introduced a compile regression on sparc.
      
      kgdbts.c: In function 'check_and_rewind_pc':
      kgdbts.c:307: error: implicit declaration of function 'instruction_pointer_set'
      
      Simply add the correct macro definition for instruction pointer on the
      Sparc architecture.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      33d8881a
  14. 21 7月, 2011 1 次提交
    • P
      treewide: fix potentially dangerous trailing ';' in #defined values/expressions · 497888cf
      Phil Carmody 提交于
      All these are instances of
        #define NAME value;
      or
        #define NAME(params_opt) value;
      
      These of course fail to build when used in contexts like
        if(foo $OP NAME)
        while(bar $OP NAME)
      and may silently generate the wrong code in contexts such as
        foo = NAME + 1;    /* foo = value; + 1; */
        bar = NAME - 1;    /* bar = value; - 1; */
        baz = NAME & quux; /* baz = value; & quux; */
      
      Reported on comp.lang.c,
      Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com>
      Initial analysis of the dangers provided by Keith Thompson in that thread.
      
      There are many more instances of more complicated macros having unnecessary
      trailing semicolons, but this pile seems to be all of the cases of simple
      values suffering from the problem. (Thus things that are likely to be found
      in one of the contexts above, more complicated ones aren't.)
      Signed-off-by: NPhil Carmody <ext-phil.2.carmody@nokia.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      497888cf
  15. 17 7月, 2011 1 次提交
  16. 06 7月, 2011 2 次提交