diff --git a/arch/sh64/Makefile b/arch/sh64/Makefile
index 8ca57ffa2b709f57cc23453cc1dd0c293a558ffa..ebf20043991ce073b6e4ec3d6161a24f5bb2e141 100644
--- a/arch/sh64/Makefile
+++ b/arch/sh64/Makefile
@@ -26,7 +26,6 @@ LDFLAGS			+= -EB  -mshelf32_linux
 endif
 
 # No requirements for endianess support from AFLAGS, 'as' always run through gcc
-AFLAGS		+= -m5 -isa=sh64 -traditional
 CFLAGS		+= $(cpu-y)
 
 LDFLAGS_vmlinux	+= --defsym phys_stext=_stext-$(CONFIG_CACHED_MEMORY_OFFSET) \
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c
index dba8e14013b6b9c2bc3166a4fcef97511cb78804..db475b7833fb86c97b77d70d8c45f9200905dfdf 100644
--- a/arch/sh64/kernel/process.c
+++ b/arch/sh64/kernel/process.c
@@ -355,6 +355,9 @@ void machine_power_off(void)
 	enter_deep_standby();
 }
 
+void (*pm_power_off)(void) = machine_power_off;
+EXPORT_SYMBOL(pm_power_off);
+
 void show_regs(struct pt_regs * regs)
 {
 	unsigned long long ah, al, bh, bl, ch, cl;
diff --git a/arch/sh64/mach-cayman/setup.c b/arch/sh64/mach-cayman/setup.c
index d84895dda3cdddb445bb50e806045c38414c7a3a..3ed87cd059d064e01da3949d9420d18a34818470 100644
--- a/arch/sh64/mach-cayman/setup.c
+++ b/arch/sh64/mach-cayman/setup.c
@@ -112,8 +112,10 @@ struct resource io_resources[] = {
 };
 
 struct resource kram_resources[] = {
-	{ "Kernel code", 0, 0 },	/* These must be last in the array */
-	{ "Kernel data", 0, 0 }		/* These must be last in the array */
+	/* These must be last in the array */
+	{ .name = "Kernel code", .start = 0, .end = 0 },
+	/* These must be last in the array */
+	{ .name = "Kernel data", .start = 0, .end = 0 }
 };
 
 struct resource xram_resources[] = {
diff --git a/arch/sh64/mm/ioremap.c b/arch/sh64/mm/ioremap.c
index fb1866fa2c9d1d62b1cd294f7178dfebd1560285..80c56754f51309f0d9f2c09238fe4ce8a04082d9 100644
--- a/arch/sh64/mm/ioremap.c
+++ b/arch/sh64/mm/ioremap.c
@@ -449,7 +449,9 @@ ioremap_proc_info(char *buf, char **start, off_t fpos, int length, int *eof,
 		if (p + 32 >= e)        /* Better than nothing */
 			break;
 		if ((nm = r->name) == 0) nm = "???";
-		p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm);
+		p += sprintf(p, "%08lx-%08lx: %s\n",
+			     (unsigned long)r->start,
+			     (unsigned long)r->end, nm);
 	}
 
 	return p-buf;
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 301573373c30ad856f02752c1b1306b27b81e12a..cbede06cac27915d92664b1019b5a859adfdbb62 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -1579,7 +1579,7 @@ static int __init serial_console_setup(struct console *co, char *options)
 	h8300_sci_enable(port, sci_enable);
 #endif
 #elif defined(CONFIG_SUPERH64)
-	port->uartclk = current_cpu_info.module_clock * 16;
+	port->uartclk = current_cpu_data.module_clock * 16;
 #else
 	{
 		struct clk *clk = clk_get("module_clk");
@@ -1720,7 +1720,7 @@ static int __init sci_init(void)
 #if defined(__H8300H__) || defined(__H8300S__)
 			sciport->port.uartclk = CONFIG_CPU_CLOCK;
 #elif defined(CONFIG_SUPERH64)
-			sciport->port.uartclk = current_cpu_info.module_clock * 16;
+			sciport->port.uartclk = current_cpu_data.module_clock * 16;
 #else
 			struct clk *clk = clk_get("module_clk");
 			sciport->port.uartclk = clk_get_rate(clk) * 16;
diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h
index 81f722efeb6352de0145c68a88e823a0eaccc91c..f3a9c9248ef4c788826a2a6a7ec5d71c4c50f38f 100644
--- a/include/asm-sh64/bug.h
+++ b/include/asm-sh64/bug.h
@@ -1,7 +1,7 @@
 #ifndef __ASM_SH64_BUG_H
 #define __ASM_SH64_BUG_H
 
-
+#ifdef CONFIG_BUG
 /*
  * Tell the user there is some problem, then force a segfault (in process
  * context) or a panic (interrupt context).
@@ -11,17 +11,9 @@
 	*(volatile int *)0 = 0; \
 } while (0)
 
-#define BUG_ON(condition) do { \
-	if (unlikely((condition)!=0)) \
-		BUG(); \
-} while(0)
+#define HAVE_ARCH_BUG
+#endif
 
-#define WARN_ON(condition) do { \
-	if (unlikely((condition)!=0)) { \
-		printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \
-		dump_stack(); \
-	} \
-} while (0)
+#include <asm-generic/bug.h>
 
 #endif /* __ASM_SH64_BUG_H */
-
diff --git a/include/asm-sh64/byteorder.h b/include/asm-sh64/byteorder.h
index f602ebe334ebc3dcc25e0f9207dd87373de98d8c..7419d78820ee52f7a3d507e2142c47c73a7a878d 100644
--- a/include/asm-sh64/byteorder.h
+++ b/include/asm-sh64/byteorder.h
@@ -14,7 +14,7 @@
 
 #include <asm/types.h>
 
-static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
+static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
 {
 	__asm__("byterev	%0, %0\n\t"
 		"shari		%0, 32, %0"
@@ -23,7 +23,7 @@ static __inline__ __const__ __u32 ___arch__swab32(__u32 x)
 	return x;
 }
 
-static __inline__ __const__ __u16 ___arch__swab16(__u16 x)
+static inline __attribute_const__ __u16 ___arch__swab16(__u16 x)
 {
 	__asm__("byterev	%0, %0\n\t"
 		"shari		%0, 48, %0"
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h
index a74a49e47922b03e223b8db5a387d93335d1bc7c..68e27a8fca31f20d90257d454251a31b58e180b5 100644
--- a/include/asm-sh64/dma-mapping.h
+++ b/include/asm-sh64/dma-mapping.h
@@ -126,22 +126,30 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
 static inline void dma_sync_single_for_cpu(struct device *dev,
 					   dma_addr_t dma_handle, size_t size,
 					   enum dma_data_direction dir)
-	__attribute__ ((alias("dma_sync_single")));
+{
+	dma_sync_single(dev, dma_handle, size, dir);
+}
 
 static inline void dma_sync_single_for_device(struct device *dev,
 					   dma_addr_t dma_handle, size_t size,
 					   enum dma_data_direction dir)
-	__attribute__ ((alias("dma_sync_single")));
+{
+	dma_sync_single(dev, dma_handle, size, dir);
+}
 
 static inline void dma_sync_sg_for_cpu(struct device *dev,
 				       struct scatterlist *sg, int nelems,
 				       enum dma_data_direction dir)
-	__attribute__ ((alias("dma_sync_sg")));
+{
+	dma_sync_sg(dev, sg, nelems, dir);
+}
 
 static inline void dma_sync_sg_for_device(struct device *dev,
 				       struct scatterlist *sg, int nelems,
 				       enum dma_data_direction dir)
-	__attribute__ ((alias("dma_sync_sg")));
+{
+	dma_sync_sg(dev, sg, nelems, dir);
+}
 
 static inline int dma_get_cache_alignment(void)
 {
diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h
index dee4f77929a45523089d5e98fa46a95ce890aa75..252fedbb6621e4cbd5df0f815d51ef7b4414a636 100644
--- a/include/asm-sh64/io.h
+++ b/include/asm-sh64/io.h
@@ -123,6 +123,13 @@ void insw(unsigned long port, void *addr, unsigned long count);
 void outsl(unsigned long port, const void *addr, unsigned long count);
 void insl(unsigned long port, void *addr, unsigned long count);
 
+#define __raw_readb		readb
+#define __raw_readw		readw
+#define __raw_readl		readl
+#define __raw_writeb		writeb
+#define __raw_writew		writew
+#define __raw_writel		writel
+
 void memcpy_toio(void __iomem *to, const void *from, long count);
 void memcpy_fromio(void *to, void __iomem *from, long count);
 
diff --git a/include/asm-sh64/ptrace.h b/include/asm-sh64/ptrace.h
index 56190f5215872af48c72c30e78a59e9169fe13db..a6d4da519db6238ff250a570ed5eb6285be4b2cc 100644
--- a/include/asm-sh64/ptrace.h
+++ b/include/asm-sh64/ptrace.h
@@ -28,7 +28,7 @@ struct pt_regs {
 #ifdef __KERNEL__
 #define user_mode(regs) (((regs)->sr & 0x40000000)==0)
 #define instruction_pointer(regs) ((regs)->pc)
-#define profile_pc(regs) instruction_pointer(regs)
+#define profile_pc(regs) ((unsigned long)instruction_pointer(regs))
 extern void show_regs(struct pt_regs *);
 #endif
 
diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h
index 87ef6f1ad5a47f5e2df6f941439ff30d5a113eb8..b1598c26fcb088fe06d809540f7f90c3adde171d 100644
--- a/include/asm-sh64/system.h
+++ b/include/asm-sh64/system.h
@@ -64,7 +64,7 @@ extern void __xchg_called_with_bad_pointer(void);
 #define smp_read_barrier_depends()	do { } while (0)
 #endif /* CONFIG_SMP */
 
-#define set_rmb(var, value) do { xchg(&var, value); } while (0)
+#define set_rmb(var, value) do { (void)xchg(&var, value); } while (0)
 #define set_mb(var, value) set_rmb(var, value)
 
 /* Interrupt Control */
diff --git a/include/asm-sh64/uaccess.h b/include/asm-sh64/uaccess.h
index f4936d8fa617fe9b7ecc8e2895055147f492fa4c..644c67b65f94596a208a3015f86ba6b37fc695ed 100644
--- a/include/asm-sh64/uaccess.h
+++ b/include/asm-sh64/uaccess.h
@@ -128,25 +128,20 @@ do {								\
 
 #define __get_user_nocheck(x,ptr,size)				\
 ({								\
-	long __gu_addr = (long)(ptr);				\
-	long __gu_err;						\
-	__typeof(*(ptr)) __gu_val;				\
-	__asm__ ("":"=r" (__gu_val));				\
-	__asm__ ("":"=r" (__gu_err));				\
-	__get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \
-	(x) = (__typeof__(*(ptr))) __gu_val;			\
+	long __gu_err, __gu_val;				\
+	__get_user_size((void *)&__gu_val, (long)(ptr),		\
+			(size), __gu_err);			\
+	(x) = (__typeof__(*(ptr)))__gu_val;			\
 	__gu_err;						\
 })
 
 #define __get_user_check(x,ptr,size)				\
 ({								\
 	long __gu_addr = (long)(ptr);				\
-	long __gu_err = -EFAULT;				\
-	__typeof(*(ptr)) __gu_val;				\
-	__asm__ ("":"=r" (__gu_val));				\
-	__asm__ ("":"=r" (__gu_err));				\
+	long __gu_err = -EFAULT, __gu_val;			\
 	if (__access_ok(__gu_addr, (size)))			\
-		__get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \
+		__get_user_size((void *)&__gu_val, __gu_addr,	\
+				(size), __gu_err);		\
 	(x) = (__typeof__(*(ptr))) __gu_val;			\
 	__gu_err;						\
 })