OSDN Git Service

clean up 3rd round
authorYoshinori Sato <ysato@users.sourceforge.jp>
Fri, 16 Jan 2015 18:22:24 +0000 (03:22 +0900)
committerYoshinori Sato <ysato@users.sourceforge.jp>
Fri, 16 Jan 2015 18:22:24 +0000 (03:22 +0900)
21 files changed:
arch/h8300/boot/compressed/misc.c
arch/h8300/include/asm/irq.h
arch/h8300/include/asm/ptrace.h
arch/h8300/include/asm/string.h
arch/h8300/include/asm/switch_to.h
arch/h8300/include/asm/uaccess.h
arch/h8300/kernel/h8300_ksyms.c
arch/h8300/kernel/irq.c
arch/h8300/kernel/irq_h.c
arch/h8300/kernel/process.c
arch/h8300/kernel/ptrace.c
arch/h8300/kernel/ptrace_h.c
arch/h8300/kernel/signal.c
arch/h8300/kernel/sys_h8300.c
arch/h8300/kernel/timer/timer8.c
arch/h8300/kernel/timer/tpu.c
arch/h8300/kernel/traps.c
arch/h8300/kernel/vmlinux.lds.S
arch/h8300/lib/Makefile
arch/h8300/lib/abs.S
arch/h8300/lib/ashrdi3.c [deleted file]

index 7f77a24..7042741 100644 (file)
@@ -20,7 +20,7 @@
 
 #undef memset
 #undef memcpy
-#define memzero(s, n)     memset ((s), 0, (n))
+#define memzero(s, n)     memset((s), (0), (n))
 
 extern int _end;
 static unsigned long free_mem_ptr;
@@ -34,34 +34,36 @@ static unsigned char *output;
 
 #include "../../../../lib/decompress_inflate.c"
 
-void* memset(void* s, int c, size_t n)
+void *memset(void *s, int c, size_t n)
 {
        int i;
-       char *ss = (char*)s;
+       char *ss = (char *)s;
 
-       for (i=0;i<n;i++) ss[i] = c;
+       for (i = 0; i < n; i++)
+               ss[i] = c;
        return s;
 }
 
-void* memcpy(void* __dest, __const void* __src,
-                           size_t __n)
+void *memcpy(void *dest, const void *src, size_t n)
 {
        int i;
-       char *d = (char *)__dest, *s = (char *)__src;
+       char *d = (char *)dest, *s = (char *)src;
 
-       for (i=0;i<__n;i++) d[i] = s[i];
-       return __dest;
+       for (i = 0; i < n; i++)
+               d[i] = s[i];
+       return dest;
 }
 
 static void error(char *x)
 {
 
-       while(1);       /* Halt */
+       while (1)
+               ;       /* Halt */
 }
 
 #define STACK_SIZE (4096)
-long user_stack [STACK_SIZE];
-longstack_start = &user_stack[STACK_SIZE];
+long user_stack[STACK_SIZE];
+long *stack_start = &user_stack[STACK_SIZE];
 
 void decompress_kernel(void)
 {
index e326270..afa958e 100644 (file)
@@ -5,12 +5,12 @@
 
 #if defined(CONFIG_CPU_H8300H)
 #define NR_IRQS 64
-#define IRQ_CHIP &(h8300h_irq_chip)
+#define IRQ_CHIP h8300h_irq_chip
 #define EXT_IRQ0 12
 #define EXT_IRQS 6
 #elif defined(CONFIG_CPU_H8S)
 #define NR_IRQS 128
-#define IRQ_CHIP &(h8s_irq_chip)
+#define IRQ_CHIP h8s_irq_chip
 #define EXT_IRQ0 16
 #define EXT_IRQS 16
 #endif
index 87de7b3..6ed57eb 100644 (file)
@@ -28,7 +28,7 @@
 #define signal_pt_regs() ((struct pt_regs *)current->thread.esp0)
 #define current_user_stack_pointer() rdusp()
 #define task_pt_regs(task) \
-         ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
+       ((struct pt_regs *) (task_stack_page(task) + THREAD_SIZE) - 1)
 
 #endif /* __ASSEMBLY__ */
 #endif /* _H8300_PTRACE_H */
index 316451a..5dc5a8a 100644 (file)
@@ -7,10 +7,10 @@
 #include <asm/page.h>
 
 #define __HAVE_ARCH_MEMSET
-extern void * memset(void *s, int c, size_t count);
+extern void *memset(void *s, int c, size_t count);
 
 #define __HAVE_ARCH_MEMCPY
-extern void * memcpy(void *d, const void *s, size_t count);
+extern void *memcpy(void *d, const void *s, size_t count);
 
 #endif /* KERNEL */
 
index ee23d8d..7ad1bf9 100644 (file)
@@ -46,6 +46,6 @@ do {                       \
                  "g" (prev)                                \
                : "cc", "er0", "er1", "er2", "er3");        \
        (last) = _last;                                     \
-} while(0)
+} while (0)
 
 #endif /* _H8300_SWITCH_TO_H */
index de69cd4..d85e4f6 100644 (file)
@@ -38,8 +38,7 @@ static inline int __access_ok(unsigned long addr, unsigned long size)
  * on our cache or tlb entries.
  */
 
-struct exception_table_entry
-{
+struct exception_table_entry {
        unsigned long insn, fixup;
 };
 
@@ -58,7 +57,9 @@ extern unsigned long search_exception_table(unsigned long);
        typeof(*(ptr)) __pu_val = (x);                  \
        switch (sizeof(*(ptr))) {                       \
        case 1:                                         \
+       /* failthrough */ \
        case 2:                                         \
+       /* failthrough */ \
        case 4:                                         \
                *(ptr) = x;                             \
                break;                                  \
@@ -95,17 +96,17 @@ extern int __put_user_bad(void);
 
 #define get_user(x, ptr)                                       \
 ({                                                             \
-       unsigned long long __gu_val;                            \
+       typeof(*(ptr)) __gu_val;                                \
        int __gu_err = 0;                                       \
        switch (sizeof(*(ptr))) {                               \
        case 1:                                                 \
-               __gu_val = *((u8 *)(ptr));                      \
+               *(u8 *)&__gu_val = *((u8 *)(ptr));              \
                break;                                          \
        case 2:                                                 \
-               __gu_val = *((u16 *)ptr);                       \
+               *(u16 *)&__gu_val = *((u16 *)ptr);              \
                break;                                          \
        case 4:                                                 \
-               __gu_val = *((u32 *)ptr);                       \
+               *(u32 *)&__gu_val = *((u32 *)ptr);              \
                break;                                          \
        case 8:                                                 \
                memcpy((void *)&__gu_val, ptr, sizeof(*(ptr))); \
@@ -114,7 +115,7 @@ extern int __put_user_bad(void);
                __gu_err = __get_user_bad();                    \
                break;                                          \
        }                                                       \
-       *(unsigned long *)&(x) = __gu_val;                      \
+       (x) = (typeof(*(ptr)))__gu_val;                         \
        __gu_err;                                               \
 })
 #define __get_user(x, ptr) get_user(x, ptr)
index ce075f1..64fbf32 100644 (file)
@@ -43,7 +43,7 @@ extern void __udivsi3(void);
 extern void __umoddi3(void);
 extern void __umodsi3(void);
 
-        /* gcc lib functions */
+       /* gcc lib functions */
 EXPORT_SYMBOL(__gcc_bcmp);
 EXPORT_SYMBOL(__ashldi3);
 EXPORT_SYMBOL(__ashrdi3);
index c1a9514..dbff621 100644 (file)
@@ -95,7 +95,7 @@ void __init init_IRQ(void)
        h8300_init_ipr();
 
        for (c = 0; c < NR_IRQS; c++)
-               irq_set_chip_and_handler(c, IRQ_CHIP, handle_simple_irq);
+               irq_set_chip_and_handler(c, &IRQ_CHIP, handle_simple_irq);
 }
 
 asmlinkage void do_IRQ(int irq)
index e8088b9..90021d8 100644 (file)
@@ -23,26 +23,28 @@ static const char ipr_bit[] = {
 static void h8300h_disable_irq(struct irq_data *data)
 {
        int bit;
-       unsigned int addr;
        int irq = data->irq - 12;
 
        bit = ipr_bit[irq];
        if (bit >= 0) {
-               addr = IPR + (irq >> 3);
-               ctrl_bclr(bit & 7, addr);
+               if (bit < 8)
+                       ctrl_bclr(bit & 7, IPR);
+               else
+                       ctrl_bclr(bit & 7, (IPR+1));
        }
 }
 
 static void h8300h_enable_irq(struct irq_data *data)
 {
        int bit;
-       unsigned int addr;
        int irq = data->irq - 12;
 
        bit = ipr_bit[irq];
        if (bit >= 0) {
-               addr = IPR + (irq >> 3);
-               ctrl_bset(bit & 7, addr);
+               if (bit < 8)
+                       ctrl_bset(bit & 7, IPR);
+               else
+                       ctrl_bset(bit & 7, (IPR+1));
        }
 }
 
index 6f116cc..5241f29 100644 (file)
@@ -68,14 +68,16 @@ void machine_halt(void)
 {
        local_irq_disable();
        __asm__("sleep");
-       for (;;);
+       for (;;)
+               ;
 }
 
 void machine_power_off(void)
 {
        local_irq_disable();
        __asm__("sleep");
-       for (;;);
+       for (;;)
+               ;
 }
 
 void show_regs(struct pt_regs *regs)
@@ -103,7 +105,7 @@ int copy_thread(unsigned long clone_flags,
                unsigned long usp, unsigned long topstk,
                struct task_struct *p)
 {
-       struct pt_regs * childregs;
+       struct pt_regs *childregs;
 
        childregs = (struct pt_regs *) (THREAD_SIZE + task_stack_page(p)) - 1;
 
index 2f12f40..5422b3d 100644 (file)
@@ -57,95 +57,95 @@ long arch_ptrace(struct task_struct *child, long request,
 
        switch (request) {
        /* read the word at location addr in the USER area. */
-               case PTRACE_PEEKUSR: {
-                       unsigned long tmp = 0;
+       case PTRACE_PEEKUSR: {
+               unsigned long tmp = 0;
 
-                       if ((addr & 3) || addr >= sizeof(struct user)) {
-                               ret = -EIO;
-                               break;
-                       }
-
-                       ret = 0;  /* Default return condition */
-
-                       if (regno < H8300_REGS_NO)
-                               tmp = h8300_get_reg(child, regno);
-                       else {
-                               switch (regno) {
-                               case 49:
-                                       tmp = child->mm->start_code;
-                                       break;
-                               case 50:
-                                       tmp = child->mm->start_data;
-                                       break;
-                               case 51:
-                                       tmp = child->mm->end_code;
-                                       break;
-                               case 52:
-                                       tmp = child->mm->end_data;
-                                       break;
-                               default:
-                                       ret = -EIO;
-                               }
-                       }
-                       if (!ret)
-                               ret = put_user(tmp, datap);
-                       break ;
+               if ((addr & 3) || addr >= sizeof(struct user)) {
+                       ret = -EIO;
+                       break;
                }
 
-      /* when I and D space are separate, this will have to be fixed. */
-               case PTRACE_POKEUSR: /* write the word at location addr
-                                       in the USER area */
-                       if ((addr & 3) || addr >= sizeof(struct user)) {
-                               ret = -EIO;
+               ret = 0;  /* Default return condition */
+
+               if (regno < H8300_REGS_NO)
+                       tmp = h8300_get_reg(child, regno);
+               else {
+                       switch (regno) {
+                       case 49:
+                               tmp = child->mm->start_code;
                                break;
-                       }
-                           
-                       if (regno == PT_ORIG_ER0) {
-                               ret = -EIO;
+                       case 50:
+                               tmp = child->mm->start_data;
                                break;
-                       }
-                       if (regno < H8300_REGS_NO) {
-                               ret = h8300_put_reg(child, regno, data);
+                       case 51:
+                               tmp = child->mm->end_code;
+                               break;
+                       case 52:
+                               tmp = child->mm->end_data;
                                break;
+                       default:
+                               ret = -EIO;
                        }
+               }
+               if (!ret)
+                       ret = put_user(tmp, datap);
+               break ;
+       }
+
+               /* when I and D space are separate, this will have to be fixed. */
+       case PTRACE_POKEUSR: /* write the word at location addr
+                               in the USER area */
+               if ((addr & 3) || addr >= sizeof(struct user)) {
                        ret = -EIO;
                        break;
+               }
 
-               case PTRACE_GETREGS: { /* Get all gp regs from the child. */
-                       int i;
-                       unsigned long tmp;
-
-                       for (i = 0; i < H8300_REGS_NO; i++) {
-                               tmp = h8300_get_reg(child, i);
-                               if (put_user(tmp, datap)) {
-                                       ret = -EFAULT;
-                                       break;
-                               }
-                               datap++;
-                       }
-                       ret = 0;
+               if (regno == PT_ORIG_ER0) {
+                       ret = -EIO;
+                       break;
+               }
+               if (regno < H8300_REGS_NO) {
+                       ret = h8300_put_reg(child, regno, data);
                        break;
                }
+               ret = -EIO;
+               break;
+
+       case PTRACE_GETREGS: { /* Get all gp regs from the child. */
+               int i;
+               unsigned long tmp;
 
-               case PTRACE_SETREGS: { /* Set all gp regs in the child. */
-                       int i;
-                       unsigned long tmp;
-
-                       for (i = 0; i < H8300_REGS_NO; i++) {
-                               if (get_user(tmp, datap)) {
-                                       ret = -EFAULT;
-                                       break;
-                               }
-                               h8300_put_reg(child, i, tmp);
-                               datap++;
+               for (i = 0; i < H8300_REGS_NO; i++) {
+                       tmp = h8300_get_reg(child, i);
+                       if (put_user(tmp, datap)) {
+                               ret = -EFAULT;
+                               break;
                        }
-                       ret = 0;
-                       break;
+                       datap++;
                }
+               ret = 0;
+               break;
+       }
 
-               default:
-                       ret = ptrace_request(child, request, addr, data);
-                       break;
+       case PTRACE_SETREGS: { /* Set all gp regs in the child. */
+               int i;
+               unsigned long tmp;
+
+               for (i = 0; i < H8300_REGS_NO; i++) {
+                       if (get_user(tmp, datap)) {
+                               ret = -EFAULT;
+                               break;
+                       }
+                       h8300_put_reg(child, i, tmp);
+                       datap++;
+               }
+               ret = 0;
+               break;
+       }
+
+       default:
+               ret = ptrace_request(child, request, addr, data);
+               break;
        }
        return ret;
 }
index c21e325..f76b143 100644 (file)
@@ -94,14 +94,14 @@ struct optable {
        unsigned char bitmask;
        signed char length;
        signed char type;
-} __packed, __aligned(1);
+} __packed __aligned(1);
 
 #define OPTABLE(ptn, msk, len, jmp)    \
-        {                              \
+                                     \
                .bitpattern = ptn,      \
                .bitmask    = msk,      \
                .length     = len,      \
-               .type       = jmp,      \
+               .type       = jmp,      \
        }
 
 static const struct optable optable_0[] = {
@@ -118,13 +118,13 @@ static const struct optable optable_0[] = {
        OPTABLE(0x20, 0xe0,  1, none), /* 0x20-0x3f */
        OPTABLE(0x40, 0xf0,  1, relb), /* 0x40-0x4f */
        OPTABLE(0x50, 0xfc,  1, none), /* 0x50-0x53 */
-       OPTABLE(0x54, 0xfd,  1, ret ), /* 0x54/0x56 */
+       OPTABLE(0x54, 0xfd,  1, ret), /* 0x54/0x56 */
        OPTABLE(0x55, 0xff,  1, relb), /* 0x55 */
        OPTABLE(0x57, 0xff,  1, none), /* 0x57 */
        OPTABLE(0x58, 0xfb,  2, relw), /* 0x58/0x5c */
-       OPTABLE(0x59, 0xfb,  1, reg ), /* 0x59/0x5b */
+       OPTABLE(0x59, 0xfb,  1, reg), /* 0x59/0x5b */
        OPTABLE(0x5a, 0xfb,  2, jabs), /* 0x5a/0x5e */
-       OPTABLE(0x5b, 0xfb,  2, ind ), /* 0x5b/0x5f */
+       OPTABLE(0x5b, 0xfb,  2, ind), /* 0x5b/0x5f */
        OPTABLE(0x60, 0xe8,  1, none), /* 0x60-0x67/0x70-0x77 */
        OPTABLE(0x68, 0xfa,  1, none), /* 0x68-0x69/0x6c-0x6d */
        OPTABLE(0x6a, 0xfe, -2, none), /* 0x6a-0x6b */
@@ -133,7 +133,7 @@ static const struct optable optable_0[] = {
        OPTABLE(0x79, 0xff,  2, none), /* 0x79 */
        OPTABLE(0x7a, 0xff,  3, none), /* 0x7a */
        OPTABLE(0x7b, 0xff,  2, none), /* 0x7b */
-       OPTABLE(0x7c, 0xfc,  2 ,none), /* 0x7c-0x7f */
+       OPTABLE(0x7c, 0xfc,  2none), /* 0x7c-0x7f */
        OPTABLE(0x80, 0x80,  1, none), /* 0x80-0xff */
 };
 
@@ -161,7 +161,7 @@ static const struct optable optable_4[] = {
    0x0100698?/0x01006d8?/0140698?/0x01406d8? */
        OPTABLE(0x00, 0x78, 3, none),
 /* 0x0100692?/0x01006d2?/0140692?/0x01406d2?/
-   0x010069a?/0x01006da?/014069a?/0x01406da? */        
+   0x010069a?/0x01006da?/014069a?/0x01406da? */
        OPTABLE(0x20, 0x78, 4, none),
 };
 
@@ -170,7 +170,7 @@ static const struct optables_list {
        int size;
 } optables[] = {
 #define OPTABLES(no)                                                   \
-        {                                                              \
+       {                                                              \
                .ptr  = optable_##no,                                  \
                .size = sizeof(optable_##no) / sizeof(struct optable), \
        }
@@ -186,9 +186,10 @@ const unsigned char condmask[] = {
        0x00, 0x40, 0x01, 0x04, 0x02, 0x08, 0x10, 0x20
 };
 
-static int isbranch(struct task_struct *task,int reson)
+static int isbranch(struct task_struct *task, int reson)
 {
        unsigned char cond = h8300_get_reg(task, PT_CCR);
+
        /* encode complex conditions */
        /* B4: N^V
           B5: Z|(N^V)
@@ -201,7 +202,7 @@ static int isbranch(struct task_struct *task,int reson)
                "bld #2,%w0\n\t"
                "bor #0,%w0\n\t"
                "bst #6,%w0\n\t"
-               : "=&r"(cond) :: "cc");
+               : "=&r"(cond) : : "cc");
        cond &= condmask[reson >> 1];
        if (!(reson & 1))
                return cond == 0;
@@ -209,12 +210,17 @@ static int isbranch(struct task_struct *task,int reson)
                return cond != 0;
 }
 
-static unsigned short *decode(struct task_struct *child, struct optable op,
-                             char *fetch_p, unsigned int *pc)
+static unsigned short *decode(struct task_struct *child, const struct optable *op,
+                             char *fetch_p, unsigned short *pc,
+                             unsigned char inst)
 {
+       unsigned long addr;
+       unsigned long *sp;
+       int regno;
+
        switch (op->type) {
        case none:
-               return pc + op->length;
+               return (unsigned short *)pc + op->length;
        case jabs:
                addr = *(unsigned long *)pc;
                return (unsigned short *)(addr & 0x00ffffff);
@@ -248,6 +254,8 @@ static unsigned short *decode(struct task_struct *child, struct optable op,
                        pc = (unsigned short *)((unsigned long)pc +
                                                ((signed short)(*(pc+1))));
                return pc+2; /* skip myself */
+       default:
+               return NULL;
        }
 }
 
@@ -255,10 +263,8 @@ static unsigned short *nextpc(struct task_struct *child, unsigned short *pc)
 {
        const struct optable *op;
        unsigned char *fetch_p;
+       int op_len;
        unsigned char inst;
-       unsigned long addr;
-       unsigned long *sp;
-       int op_len, regno;
 
        op = optables[0].ptr;
        op_len = optables[0].size;
@@ -271,10 +277,10 @@ static unsigned short *nextpc(struct task_struct *child, unsigned short *pc)
                                op_len = optables[-op->length].size + 1;
                                inst = *fetch_p++;
                        } else
-                               return decode(child, op, fetch_p, pc);
+                               return decode(child, op, fetch_p, pc, inst);
                } else
                        op++;
-       } while(--op_len > 0);
+       } while (--op_len > 0);
        return NULL;
 }
 
index bee409e..d5bf4f7 100644 (file)
@@ -199,7 +199,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
        err |= __put_user(0, &frame->uc.uc_link);
        err |= __save_altstack(&frame->uc.uc_stack, rdusp());
        err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, set->sig[0]);
-       err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set));
+       err |= copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
        if (err)
                goto give_sigsegv;
 
@@ -241,7 +241,7 @@ give_sigsegv:
 static void
 handle_restart(struct pt_regs *regs, struct k_sigaction *ka)
 {
-       switch(regs->er0) {
+       switch (regs->er0) {
        case -ERESTARTNOHAND:
                if (!ka)
                        goto do_restart;
@@ -261,11 +261,11 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka)
                }
                /* fallthrough */
        case -ERESTARTNOINTR:
-       do_restart:
+do_restart:
                regs->er0 = regs->orig_er0;
                regs->pc -= 2;
                break;
-       }       
+       }
 }
 
 /*
index f9c5578..aa2302c 100644 (file)
@@ -11,7 +11,7 @@
 
 /* sys_cacheflush -- no support.  */
 asmlinkage int
-sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
+sys_cacheflush(unsigned long addr, int scope, int cache, unsigned long len)
 {
        return -EINVAL;
 }
index 0c6322a..00b1b51 100644 (file)
@@ -106,7 +106,7 @@ static irqreturn_t timer8_interrupt(int irq, void *dev_id)
 
        return IRQ_HANDLED;
 }
-       
+
 static inline struct timer8_priv *cs_to_priv(struct clocksource *cs)
 {
        return container_of(cs, struct timer8_priv, clk.cs);
@@ -300,7 +300,7 @@ static int __init timer8_setup(struct timer8_priv *p,
 
        p->mode = cfg->mode;
        p->div = cfg->div;
-       switch(p->mode) {
+       switch (p->mode) {
        case H8300_TMR8_CLKSRC:
                p->clk.cs.name = pdev->name;
                p->clk.cs.rating = cfg->rating;
@@ -316,7 +316,7 @@ static int __init timer8_setup(struct timer8_priv *p,
                                "failed to request irq %d\n", irq[OVI]);
                        return ret;
                }
-               clocksource_register_hz(&p->clk.cs, 
+               clocksource_register_hz(&p->clk.cs,
                                        get_cpu_clock() / div_rate[p->div]);
                break;
        case H8300_TMR8_CLKEVTDEV:
@@ -353,8 +353,7 @@ static int timer8_probe(struct platform_device *pdev)
 
        p = kmalloc(sizeof(*p), GFP_KERNEL);
        if (p == NULL) {
-               dev_err(&pdev->dev, "failed to allocate driver data"
-                       " out of memory\n");
+               dev_err(&pdev->dev, "failed to allocate driver data.\n");
                return -ENOMEM;
        }
 
index 4e62c20..d3df3af 100644 (file)
@@ -44,6 +44,7 @@ struct tpu_priv {
 static inline unsigned long read_tcnt32(struct tpu_priv *p)
 {
        unsigned long tcnt;
+
        tcnt = ctrl_inw(p->mapbase1 + TCNT) << 16;
        tcnt |= ctrl_inw(p->mapbase2 + TCNT);
        return tcnt;
index 4457224..5a15f42 100644 (file)
@@ -90,7 +90,7 @@ static void dump(struct pt_regs *fp)
        }
        pr_info("\n");
        if (STACK_MAGIC != *(unsigned long *)((unsigned long)current+PAGE_SIZE))
-                pr_info("(Possibly corrupted stack page??)\n");
+               pr_info("(Possibly corrupted stack page??)\n");
 
        pr_info("\n\n");
 }
@@ -133,7 +133,7 @@ void show_stack(struct task_struct *task, unsigned long *esp)
                if (((unsigned long)stack & (THREAD_SIZE - 1)) == 0)
                        break;
                if (i % 8 == 0)
-                       printk("\n       ");
+                       pr_info("\n       ");
                pr_info(" %08lx", *stack++);
        }
 
index 2719d5c..e1b49aa 100644 (file)
@@ -11,7 +11,7 @@ ENTRY(_start)
 SECTIONS
 {
 #if defined(CONFIG_ROMKERNEL)
-       . = ROMTOP; 
+       . = ROMTOP;
        .vectors :
        {
        _vector = . ;
@@ -51,7 +51,7 @@ SECTIONS
        _ramstart = .;
        .data : AT(ROMEND)
 #else
-       .data : 
+       .data :
 #endif
        {
        _sdata = . ;
index 7ea3808..fa9d687 100644 (file)
@@ -2,4 +2,4 @@
 # Makefile for H8/300-specific library files..
 #
 
-lib-y  = ashrdi3.o checksum.o memcpy.o memset.o abs.o strncpy.o
+lib-y  = checksum.o memcpy.o memset.o abs.o strncpy.o
index 46b78af..efda749 100644 (file)
@@ -18,4 +18,3 @@ _abs:
        neg.l   er0
 1:
        rts
-       
diff --git a/arch/h8300/lib/ashrdi3.c b/arch/h8300/lib/ashrdi3.c
deleted file mode 100644 (file)
index 8121ac4..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* ashrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */
-/* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC 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; either version 2, or (at your option)
-any later version.
-
-GNU CC 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.
-*/
-
-#define BITS_PER_UNIT 8
-
-typedef         int SItype     __attribute__ ((mode (SI)));
-typedef unsigned int USItype   __attribute__ ((mode (SI)));
-typedef                 int DItype     __attribute__ ((mode (DI)));
-typedef int word_type __attribute__ ((mode (__word__)));
-
-struct DIstruct {SItype high, low;};
-
-typedef union
-{
-  struct DIstruct s;
-  DItype ll;
-} DIunion;
-
-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;
-}