aboutsummaryrefslogtreecommitdiff
path: root/arch/v850/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/v850/kernel')
-rw-r--r--arch/v850/kernel/anna.c2
-rw-r--r--arch/v850/kernel/as85ep1.c2
-rw-r--r--arch/v850/kernel/fpga85e2c.c2
-rw-r--r--arch/v850/kernel/gbus_int.c6
-rw-r--r--arch/v850/kernel/ma.c2
-rw-r--r--arch/v850/kernel/me2.c2
-rw-r--r--arch/v850/kernel/rte_cb.c4
-rw-r--r--arch/v850/kernel/rte_cb_leds.c2
-rw-r--r--arch/v850/kernel/rte_mb_a_pci.c3
-rw-r--r--arch/v850/kernel/rte_me2_cb.c3
-rw-r--r--arch/v850/kernel/setup.c6
-rw-r--r--arch/v850/kernel/teg.c2
-rw-r--r--arch/v850/kernel/time.c8
-rw-r--r--arch/v850/kernel/vmlinux.lds.S4
14 files changed, 21 insertions, 27 deletions
diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c
index 40892d3e3c24..0e429041a117 100644
--- a/arch/v850/kernel/anna.c
+++ b/arch/v850/kernel/anna.c
@@ -114,7 +114,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
{ "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 },
{ 0 }
};
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c
index 5352f8a5aa07..18437bc5c3ad 100644
--- a/arch/v850/kernel/as85ep1.c
+++ b/arch/v850/kernel/as85ep1.c
@@ -142,7 +142,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
{ "ST", IRQ_INTST(0), IRQ_INTST_NUM, 3, 5 },
{ 0 }
};
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c
index cb04a6954ccb..5c4923558a75 100644
--- a/arch/v850/kernel/fpga85e2c.c
+++ b/arch/v850/kernel/fpga85e2c.c
@@ -138,7 +138,7 @@ struct v850e_intc_irq_init irq_inits[] = {
{ "RPU", IRQ_RPU(0), IRQ_RPU_NUM, 1, 6 },
{ 0 }
};
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c
index 25d636e79e6a..b2bcc251f65b 100644
--- a/arch/v850/kernel/gbus_int.c
+++ b/arch/v850/kernel/gbus_int.c
@@ -16,6 +16,7 @@
#include <linux/irq.h>
#include <linux/interrupt.h>
#include <linux/signal.h>
+#include <linux/kernel.h>
#include <asm/machdep.h>
@@ -36,7 +37,7 @@ struct used_gint {
{ 1, GBUS_INT_PRIORITY_HIGH },
{ 3, GBUS_INT_PRIORITY_LOW }
};
-#define NUM_USED_GINTS (sizeof used_gint / sizeof used_gint[0])
+#define NUM_USED_GINTS ARRAY_SIZE(used_gint)
/* A table of which GINT is used by each GBUS interrupts (they are
assigned based on priority). */
@@ -231,8 +232,7 @@ struct gbus_int_irq_init gbus_irq_inits[] __initdata = {
{ "GBUS_INT", IRQ_GBUS_INT(0), IRQ_GBUS_INT_NUM, 1, 6},
{ 0 }
};
-#define NUM_GBUS_IRQ_INITS \
- ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1)
+#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)
static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
diff --git a/arch/v850/kernel/ma.c b/arch/v850/kernel/ma.c
index 2aa8ab0f7edc..143774de75e1 100644
--- a/arch/v850/kernel/ma.c
+++ b/arch/v850/kernel/ma.c
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
{ "ST", IRQ_INTST(0), IRQ_INTST_NUM, 4, 5 },
{ 0 }
};
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c
index 14b0c8858aa4..38be5c194f6b 100644
--- a/arch/v850/kernel/me2.c
+++ b/arch/v850/kernel/me2.c
@@ -44,7 +44,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
{ "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 },
{ 0 }
};
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c
index 0f7f6cd705a2..43018e1edebd 100644
--- a/arch/v850/kernel/rte_cb.c
+++ b/arch/v850/kernel/rte_cb.c
@@ -15,6 +15,7 @@
#include <linux/irq.h>
#include <linux/fs.h>
#include <linux/module.h>
+#include <linux/kernel.h>
#include <asm/machdep.h>
#include <asm/v850e_uart.h>
@@ -176,8 +177,7 @@ static struct gbus_int_irq_init gbus_irq_inits[] = {
#endif
{ 0 }
};
-#define NUM_GBUS_IRQ_INITS \
- ((sizeof gbus_irq_inits / sizeof gbus_irq_inits[0]) - 1)
+#define NUM_GBUS_IRQ_INITS (ARRAY_SIZE(gbus_irq_inits) - 1)
static struct hw_interrupt_type gbus_hw_itypes[NUM_GBUS_IRQ_INITS];
diff --git a/arch/v850/kernel/rte_cb_leds.c b/arch/v850/kernel/rte_cb_leds.c
index 996bd4f33ecb..aa47ab1dcd87 100644
--- a/arch/v850/kernel/rte_cb_leds.c
+++ b/arch/v850/kernel/rte_cb_leds.c
@@ -117,7 +117,7 @@ static loff_t leds_dev_lseek (struct file *file, loff_t offs, int whence)
return 0;
}
-static struct file_operations leds_fops = {
+static const struct file_operations leds_fops = {
.read = leds_dev_read,
.write = leds_dev_write,
.llseek = leds_dev_lseek
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c
index 35213fa9f7d8..35a4bd5515cb 100644
--- a/arch/v850/kernel/rte_mb_a_pci.c
+++ b/arch/v850/kernel/rte_mb_a_pci.c
@@ -70,8 +70,7 @@ static struct mb_pci_dev_irq mb_pci_dev_irqs[] = {
/* PCI slot 2 */
{ 9, IRQ_MB_A_PCI2(0), 1 }
};
-#define NUM_MB_PCI_DEV_IRQS \
- (sizeof mb_pci_dev_irqs / sizeof mb_pci_dev_irqs[0])
+#define NUM_MB_PCI_DEV_IRQS ARRAY_SIZE(mb_pci_dev_irqs)
/* PCI configuration primitives. */
diff --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c
index 3be355a029e2..46803d48dffe 100644
--- a/arch/v850/kernel/rte_me2_cb.c
+++ b/arch/v850/kernel/rte_me2_cb.c
@@ -170,8 +170,7 @@ static struct cb_pic_irq_init cb_pic_irq_inits[] = {
{ "CB_EXTTM2", IRQ_CB_EXTTM2, 1, 1, 6 },
{ 0 }
};
-#define NUM_CB_PIC_IRQ_INITS \
- ((sizeof cb_pic_irq_inits / sizeof cb_pic_irq_inits[0]) - 1)
+#define NUM_CB_PIC_IRQ_INITS (ARRAY_SIZE(cb_pic_irq_inits) - 1)
static struct hw_interrupt_type cb_pic_hw_itypes[NUM_CB_PIC_IRQ_INITS];
static unsigned char cb_pic_active_irqs = 0;
diff --git a/arch/v850/kernel/setup.c b/arch/v850/kernel/setup.c
index 1bf672a25692..a914f244f494 100644
--- a/arch/v850/kernel/setup.c
+++ b/arch/v850/kernel/setup.c
@@ -42,7 +42,7 @@ extern char _root_fs_image_start __attribute__ ((__weak__));
extern char _root_fs_image_end __attribute__ ((__weak__));
-char command_line[COMMAND_LINE_SIZE];
+char __initdata command_line[COMMAND_LINE_SIZE];
/* Memory not used by the kernel. */
static unsigned long total_ram_pages;
@@ -64,8 +64,8 @@ void __init setup_arch (char **cmdline)
{
/* Keep a copy of command line */
*cmdline = command_line;
- memcpy (saved_command_line, command_line, COMMAND_LINE_SIZE);
- saved_command_line[COMMAND_LINE_SIZE - 1] = '\0';
+ memcpy (boot_command_line, command_line, COMMAND_LINE_SIZE);
+ boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
console_verbose ();
diff --git a/arch/v850/kernel/teg.c b/arch/v850/kernel/teg.c
index 290d50665016..699248f92aae 100644
--- a/arch/v850/kernel/teg.c
+++ b/arch/v850/kernel/teg.c
@@ -43,7 +43,7 @@ static struct v850e_intc_irq_init irq_inits[] = {
{ "ST", IRQ_INTST(0), IRQ_INTST_NUM, 1, 5 },
{ 0 }
};
-#define NUM_IRQ_INITS ((sizeof irq_inits / sizeof irq_inits[0]) - 1)
+#define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c
index cd06f47c0ea7..486e3a441c86 100644
--- a/arch/v850/kernel/time.c
+++ b/arch/v850/kernel/time.c
@@ -28,14 +28,6 @@
#define TICK_SIZE (tick_nsec / 1000)
/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
- return (unsigned long long)jiffies * (1000000000 / HZ);
-}
-
-/*
* timer_interrupt() needs to keep up the real-time clock,
* as well as call the "do_timer()" routine every clocktick
*/
diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S
index 3a5fd07fe064..356308221251 100644
--- a/arch/v850/kernel/vmlinux.lds.S
+++ b/arch/v850/kernel/vmlinux.lds.S
@@ -190,12 +190,16 @@
__root_fs_image_start = . ; \
*(.root) \
__root_fs_image_end = . ;
+
+#ifdef CONFIG_BLK_DEV_INITRD
/* The initramfs archive. */
#define INITRAMFS_CONTENTS \
. = ALIGN (4) ; \
___initramfs_start = . ; \
*(.init.ramfs) \
___initramfs_end = . ;
+#endif
+
/* Where the initial bootmap (bitmap for the boot-time memory allocator)
should be place. */
#define BOOTMAP_CONTENTS \