Commit a98d6920 authored by Jean-Paul Saman's avatar Jean-Paul Saman

define and implement wrong_size_cmpxchg() for arm

parent 52124ad9
......@@ -15,7 +15,7 @@ CFLAGS_REMOVE_return_address.o = -pg
obj-y := compat.o elf.o entry-armv.o entry-common.o irq.o \
process.o ptrace.o return_address.o setup.o signal.o \
sys_arm.o stacktrace.o time.o traps.o
sys_arm.o stacktrace.o time.o traps.o cmpxchg-local.o
obj-$(CONFIG_ISA_DMA_API) += dma.o
obj-$(CONFIG_ARCH_ACORN) += ecard.o
......
/*
* arch/arm/kernel/cmpxchg-local.c
*
* Copyright (C) 2009, M2X BV, All Rights Reserved
* Author: Jean-Paul Saman <jean-paul.saman@m2x.nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <linux/init.h>
#include <linux/kernel.h>
#include <asm-generic/cmpxchg-local.h>
void wrong_size_cmpxchg(volatile void *ptr)
{
printk(KERN_ERR "Wrong sized cmpxchg");
BUG();
}
......@@ -3,7 +3,7 @@
#include <linux/types.h>
extern unsigned long wrong_size_cmpxchg(volatile void *ptr);
extern void wrong_size_cmpxchg(volatile void *ptr);
/*
* Generic version of __cmpxchg_local (disables interrupts). Takes an unsigned
......@@ -12,7 +12,7 @@ extern unsigned long wrong_size_cmpxchg(volatile void *ptr);
static inline unsigned long __cmpxchg_local_generic(volatile void *ptr,
unsigned long old, unsigned long new, int size)
{
unsigned long flags, prev;
unsigned long flags, prev = 0;
/*
* Sanity checking, compile-time.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment