summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/iim.c8
-rw-r--r--arch/arm/mach-mxs/ocotp.c4
-rw-r--r--arch/blackfin/include/asm/bitops.h3
-rw-r--r--arch/blackfin/lib/Makefile1
-rw-r--r--arch/blackfin/lib/ashrdi3.c36
-rw-r--r--arch/mips/include/asm/bitops.h3
-rw-r--r--arch/nios2/include/asm/bitops.h5
-rw-r--r--arch/openrisc/Makefile4
-rw-r--r--arch/sandbox/board/hostfile.c4
-rw-r--r--arch/x86/include/asm/bitops.h7
10 files changed, 66 insertions, 9 deletions
diff --git a/arch/arm/mach-imx/iim.c b/arch/arm/mach-imx/iim.c
index f2ace8aa0f..0da8ea062b 100644
--- a/arch/arm/mach-imx/iim.c
+++ b/arch/arm/mach-imx/iim.c
@@ -84,7 +84,7 @@ static int do_fuse_sense(void __iomem *reg_base, unsigned int bank,
}
static ssize_t imx_iim_cdev_read(struct cdev *cdev, void *buf, size_t count,
- ulong offset, ulong flags)
+ loff_t offset, ulong flags)
{
ulong size, i;
struct iim_priv *priv = cdev->priv;
@@ -94,7 +94,7 @@ static ssize_t imx_iim_cdev_read(struct cdev *cdev, void *buf, size_t count,
if ((sense_param = dev_get_param(cdev->dev, "explicit_sense_enable")))
explicit_sense = simple_strtoul(sense_param, NULL, 0);
- size = min((ulong)count, priv->banksize - offset);
+ size = min((loff_t)count, priv->banksize - offset);
if (explicit_sense) {
for (i = 0; i < size; i++) {
int row_val;
@@ -176,7 +176,7 @@ out:
#endif /* CONFIG_IMX_IIM_FUSE_BLOW */
static ssize_t imx_iim_cdev_write(struct cdev *cdev, const void *buf, size_t count,
- ulong offset, ulong flags)
+ loff_t offset, ulong flags)
{
ulong size, i;
struct iim_priv *priv = cdev->priv;
@@ -186,7 +186,7 @@ static ssize_t imx_iim_cdev_write(struct cdev *cdev, const void *buf, size_t cou
if ((write_param = dev_get_param(cdev->dev, "permanent_write_enable")))
blow_enable = simple_strtoul(write_param, NULL, 0);
- size = min((ulong)count, priv->banksize - offset);
+ size = min((loff_t)count, priv->banksize - offset);
#ifdef CONFIG_IMX_IIM_FUSE_BLOW
if (blow_enable) {
for (i = 0; i < size; i++) {
diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs/ocotp.c
index 38f9ffde16..86e63dc7de 100644
--- a/arch/arm/mach-mxs/ocotp.c
+++ b/arch/arm/mach-mxs/ocotp.c
@@ -40,11 +40,11 @@ struct ocotp_priv {
};
static ssize_t mxs_ocotp_cdev_read(struct cdev *cdev, void *buf, size_t count,
- ulong offset, ulong flags)
+ loff_t offset, ulong flags)
{
struct ocotp_priv *priv = cdev->priv;
void __iomem *base = priv->base;
- size_t size = min((ulong)count, cdev->size - offset);
+ size_t size = min((loff_t)count, cdev->size - offset);
uint64_t start;
int i;
diff --git a/arch/blackfin/include/asm/bitops.h b/arch/blackfin/include/asm/bitops.h
index cdcb2f8e5d..623ddfb394 100644
--- a/arch/blackfin/include/asm/bitops.h
+++ b/arch/blackfin/include/asm/bitops.h
@@ -268,7 +268,10 @@ static __inline__ int find_next_zero_bit(void *addr, int size, int offset)
return result + ffz(tmp);
}
+#include <asm-generic/bitops/__ffs.h>
+#include <asm-generic/bitops/__fls.h>
#include <asm-generic/bitops/ffs.h>
+#include <asm-generic/bitops/fls.h>
#include <asm-generic/bitops/hweight.h>
static __inline__ int ext2_set_bit(int nr, volatile void *addr)
diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile
index 2f7731824b..cefb4dc89f 100644
--- a/arch/blackfin/lib/Makefile
+++ b/arch/blackfin/lib/Makefile
@@ -8,6 +8,7 @@ obj-y += smulsi3_highpart.o
obj-y += umodsi3.o
obj-y += lshrdi3.o
obj-y += ashldi3.o
+obj-y += ashrdi3.o
obj-y += divsi3.o
obj-y += modsi3.o
obj-y += cpu.o
diff --git a/arch/blackfin/lib/ashrdi3.c b/arch/blackfin/lib/ashrdi3.c
new file mode 100644
index 0000000000..b5b351e82e
--- /dev/null
+++ b/arch/blackfin/lib/ashrdi3.c
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2004-2009 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include "gcclib.h"
+
+#ifdef CONFIG_ARITHMETIC_OPS_L1
+DItype __ashrdi3(DItype u, word_type b)__attribute__((l1_text));
+#endif
+
+DItype __ashrdi3(DItype u, word_type b)
+{
+ DIunion w;
+ word_type bm;
+ DIunion uu;
+
+ if (b == 0)
+ return u;
+
+ uu.ll = u;
+
+ bm = (sizeof(SItype) * BITS_PER_UNIT) - b;
+ if (bm <= 0) {
+ /* w.s.high = 1..1 or 0..0 */
+ w.s.high = uu.s.high >> (sizeof(SItype) * BITS_PER_UNIT - 1);
+ w.s.low = uu.s.high >> -bm;
+ } else {
+ USItype carries = (USItype) uu.s.high << bm;
+ w.s.high = uu.s.high >> b;
+ w.s.low = ((USItype) uu.s.low >> b) | carries;
+ }
+
+ return w.ll;
+}
diff --git a/arch/mips/include/asm/bitops.h b/arch/mips/include/asm/bitops.h
index 001ebf2e72..bf1ac6e58a 100644
--- a/arch/mips/include/asm/bitops.h
+++ b/arch/mips/include/asm/bitops.h
@@ -28,5 +28,8 @@
#define _ASM_MIPS_BITOPS_H_
#include <asm-generic/bitops/__ffs.h>
+#include <asm-generic/bitops/__fls.h>
+#include <asm-generic/bitops/ffs.h>
+#include <asm-generic/bitops/fls.h>
#endif /* _ASM_MIPS_BITOPS_H_ */
diff --git a/arch/nios2/include/asm/bitops.h b/arch/nios2/include/asm/bitops.h
index ab0e3d5ff7..07128451c1 100644
--- a/arch/nios2/include/asm/bitops.h
+++ b/arch/nios2/include/asm/bitops.h
@@ -1,4 +1,9 @@
#ifndef _ASM_BITOPS_H
#define _ASM_BITOPS_H
+#include <asm-generic/bitops/__ffs.h>
+#include <asm-generic/bitops/__fls.h>
+#include <asm-generic/bitops/ffs.h>
+#include <asm-generic/bitops/fls.h>
+
#endif /* _ASM_BITOPS_H */
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile
index fd8bbbf4d7..1f4b1755d4 100644
--- a/arch/openrisc/Makefile
+++ b/arch/openrisc/Makefile
@@ -1,5 +1,7 @@
CPPFLAGS += -D__OR1K__ -ffixed-r10 -mhard-mul -mhard-div
+LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
+
board-$(CONFIG_GENERIC) := generic
KALLSYMS += --symbol-prefix=_
@@ -18,4 +20,6 @@ common-y += $(BOARD)
common-y += arch/openrisc/lib/
common-y += arch/openrisc/cpu/
+common-y += $(LIBGCC)
+
lds-y += arch/openrisc/cpu/barebox.lds
diff --git a/arch/sandbox/board/hostfile.c b/arch/sandbox/board/hostfile.c
index 90a97413b7..96fa100011 100644
--- a/arch/sandbox/board/hostfile.c
+++ b/arch/sandbox/board/hostfile.c
@@ -34,7 +34,7 @@ struct hf_priv {
struct hf_platform_data *pdata;
};
-static ssize_t hf_read(struct cdev *cdev, void *buf, size_t count, ulong offset, ulong flags)
+static ssize_t hf_read(struct cdev *cdev, void *buf, size_t count, loff_t offset, ulong flags)
{
struct hf_platform_data *hf = cdev->priv;
int fd = hf->fd;
@@ -45,7 +45,7 @@ static ssize_t hf_read(struct cdev *cdev, void *buf, size_t count, ulong offset,
return linux_read(fd, buf, count);
}
-static ssize_t hf_write(struct cdev *cdev, const void *buf, size_t count, ulong offset, ulong flags)
+static ssize_t hf_write(struct cdev *cdev, const void *buf, size_t count, loff_t offset, ulong flags)
{
struct hf_platform_data *hf = cdev->priv;
int fd = hf->fd;
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h
index b43afa3f99..830b1a5510 100644
--- a/arch/x86/include/asm/bitops.h
+++ b/arch/x86/include/asm/bitops.h
@@ -27,6 +27,11 @@
#ifndef _ASM_X86_BITOPS_H_
#define _ASM_X86_BITOPS_H_
-/* nothing special yet */
+#define BITS_PER_LONG 32
+
+#include <asm-generic/bitops/__fls.h>
+#include <asm-generic/bitops/__ffs.h>
+#include <asm-generic/bitops/fls.h>
+#include <asm-generic/bitops/ffs.h>
#endif /* _ASM_X86_BITOPS_H_ */