Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81e48073 authored by Adrian Bunk's avatar Adrian Bunk Committed by Hirokazu Takata
Browse files

m32r/kernel/: cleanups



This patch contains the following cleanups:
- make the following needlessly global code static:
  - entry.S: resume_userspace
  - process.c: pm_idle
  - process.c: default_idle()
  - smp.c: send_IPI_allbutself()
  - time.c: timer_interrupt()
  - time.c: struct irq0
  - traps.c: set_eit_vector_entries()
  - traps.c: kstack_depth_to_print
  - traps.c: show_trace()
  - traps.c: die_lock
- remove the following unused code:
  - head.S: startup_32
  - process.c: hlt_counter
  - process.c: disable_hlt()
  - process.c: enable_hlt()
  - process.c: dump_task_regs()
- remove the following variables and their usages since they were
  always 0:
  - irq.c: irq_err_count
  - irq.c: irq_mis_count

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
parent 4b65fd41
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ ret_from_intr:
	and3	r4, r4, #0x8000		; check BSM bit
#endif
	beqz	r4, resume_kernel
ENTRY(resume_userspace)
resume_userspace:
	DISABLE_INTERRUPTS(r4)		; make sure we don't miss an interrupt
					; setting need_resched or sigpending
					; between sampling and the iret
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ __INITDATA
	.global _end
ENTRY(stext)
ENTRY(_stext)
ENTRY(startup_32)
	/* Setup up the stack pointer */
	LDIMM	(r0, spi_stack_top)
	LDIMM	(r1, spu_stack_top)
+0 −6
Original line number Diff line number Diff line
@@ -22,9 +22,6 @@
#include <linux/module.h>
#include <asm/uaccess.h>

atomic_t irq_err_count;
atomic_t irq_mis_count;

/*
 * Generic, controller-independent functions:
 */
@@ -63,9 +60,6 @@ int show_interrupts(struct seq_file *p, void *v)
		seq_putc(p, '\n');
skip:
		spin_unlock_irqrestore(&irq_desc[i].lock, flags);
	} else if (i == NR_IRQS) {
		seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
		seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
	}
	return 0;
}
+2 −28
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@

#include <linux/err.h>

static int hlt_counter=0;

/*
 * Return saved PC of a blocked thread.
 */
@@ -48,31 +46,16 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
/*
 * Powermanagement idle function, if any..
 */
void (*pm_idle)(void) = NULL;
EXPORT_SYMBOL(pm_idle);
static void (*pm_idle)(void) = NULL;

void (*pm_power_off)(void) = NULL;
EXPORT_SYMBOL(pm_power_off);

void disable_hlt(void)
{
	hlt_counter++;
}

EXPORT_SYMBOL(disable_hlt);

void enable_hlt(void)
{
	hlt_counter--;
}

EXPORT_SYMBOL(enable_hlt);

/*
 * We use this is we don't have any better
 * idle routine..
 */
void default_idle(void)
static void default_idle(void)
{
	/* M32R_FIXME: Please use "cpu_sleep" mode.  */
	cpu_relax();
@@ -260,15 +243,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long spu,
	return 0;
}

/*
 * Capture the user space registers if the task is not running (in user space)
 */
int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
{
	/* M32R_FIXME */
	return 1;
}

asmlinkage int sys_fork(unsigned long r0, unsigned long r1, unsigned long r2,
	unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6,
	struct pt_regs regs)
+2 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ void smp_send_timer(void);
void smp_ipi_timer_interrupt(struct pt_regs *);
void smp_local_timer_interrupt(void);

void send_IPI_allbutself(int, int);
static void send_IPI_allbutself(int, int);
static void send_IPI_mask(cpumask_t, int, int);
unsigned long send_IPI_mask_phys(cpumask_t, int, int);

@@ -722,7 +722,7 @@ void smp_local_timer_interrupt(void)
 * ---------- --- --------------------------------------------------------
 *
 *==========================================================================*/
void send_IPI_allbutself(int ipi_num, int try)
static void send_IPI_allbutself(int ipi_num, int try)
{
	cpumask_t cpumask;

Loading