提交 08c9388f 编写于 作者: S Sam Ravnborg 提交者: David S. Miller

sparc32: remove remaining users of btfixup

Use sparc_config to hold the last two function pointers.  There was no
point generating dedicated _ops structures only for these.
Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4ba22b16
......@@ -321,11 +321,7 @@ extern unsigned int leon_build_device_irq(unsigned int real_irq,
extern void leon_update_virq_handling(unsigned int virq,
irq_flow_handler_t flow_handler,
const char *name, int do_ack);
extern void leon_clear_clock_irq(void);
extern void leon_load_profile_irq(int cpu, unsigned int limit);
extern void leon_init_timers(void);
extern void leon_clear_clock_irq(void);
extern void leon_load_profile_irq(int cpu, unsigned int limit);
extern void leon_trans_init(struct device_node *dp);
extern void leon_node_init(struct device_node *dp, struct device_node ***nextp);
extern void leon_init_IRQ(void);
......
......@@ -70,6 +70,9 @@ struct sparc_config {
/* function to obtain offsett for cs period */
unsigned int (*get_cycles_offset)(void);
void (*clear_clock_irq)(void);
void (*load_profile_irq)(int cpu, unsigned int limit);
};
extern struct sparc_config sparc_config;
......@@ -78,27 +81,6 @@ void irq_link(unsigned int irq);
void irq_unlink(unsigned int irq);
void handler_irq(unsigned int pil, struct pt_regs *regs);
/* Dave Redman (djhr@tadpole.co.uk)
* changed these to function pointers.. it saves cycles and will allow
* the irq dependencies to be split into different files at a later date
* sun4m_irq.c etc so we could reduce the kernel size.
* Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Changed these to btfixup entities... It saves cycles :)
*/
BTFIXUPDEF_CALL(void, clear_clock_irq, void)
BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
static inline void clear_clock_irq(void)
{
BTFIXUP_CALL(clear_clock_irq)();
}
static inline void load_profile_irq(int cpu, int limit)
{
BTFIXUP_CALL(load_profile_irq)(cpu, limit);
}
unsigned long leon_get_irqmask(unsigned int irq);
#ifdef CONFIG_SMP
......
......@@ -463,11 +463,11 @@ void __init leon_init_timers(void)
return;
}
void leon_clear_clock_irq(void)
static void leon_clear_clock_irq(void)
{
}
void leon_load_profile_irq(int cpu, unsigned int limit)
static void leon_load_profile_irq(int cpu, unsigned int limit)
{
}
......@@ -517,12 +517,9 @@ void __init leon_init_IRQ(void)
{
sparc_config.init_timers = leon_init_timers;
sparc_config.build_device_irq = _leon_build_device_irq;
sparc_config.clock_rate = 1000000;
BTFIXUPSET_CALL(clear_clock_irq, leon_clear_clock_irq,
BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(load_profile_irq, leon_load_profile_irq,
BTFIXUPCALL_NOP);
sparc_config.clock_rate = 1000000;
sparc_config.clear_clock_irq = leon_clear_clock_irq;
sparc_config.load_profile_irq = leon_load_profile_irq;
}
void __init leon_init(void)
......
......@@ -880,9 +880,8 @@ static void pcic_load_profile_irq(int cpu, unsigned int limit)
void __init sun4m_pci_init_IRQ(void)
{
sparc_config.build_device_irq = pcic_build_device_irq;
BTFIXUPSET_CALL(clear_clock_irq, pcic_clear_clock_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(load_profile_irq, pcic_load_profile_irq, BTFIXUPCALL_NORM);
sparc_config.clear_clock_irq = pcic_clear_clock_irq;
sparc_config.load_profile_irq = pcic_load_profile_irq;
}
int pcibios_assign_resource(struct pci_dev *pdev, int resource)
......
......@@ -506,12 +506,11 @@ void __init sun4d_init_IRQ(void)
{
local_irq_disable();
BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(load_profile_irq, sun4d_load_profile_irq, BTFIXUPCALL_NORM);
sparc_config.init_timers = sun4d_init_timers;
sparc_config.build_device_irq = sun4d_build_device_irq;
sparc_config.clock_rate = SBUS_CLOCK_RATE;
sparc_config.clear_clock_irq = sun4d_clear_clock_irq;
sparc_config.load_profile_irq = sun4d_load_profile_irq;
/* Cannot enable interrupts until OBP ticker is disabled. */
}
......@@ -462,12 +462,12 @@ void __init sun4m_init_IRQ(void)
if (num_cpu_iregs == 4)
sbus_writel(0, &sun4m_irq_global->interrupt_target);
BTFIXUPSET_CALL(clear_clock_irq, sun4m_clear_clock_irq, BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(load_profile_irq, sun4m_load_profile_irq, BTFIXUPCALL_NORM);
sparc_config.init_timers = sun4m_init_timers;
sparc_config.init_timers = sun4m_init_timers;
sparc_config.build_device_irq = sun4m_build_device_irq;
sparc_config.clock_rate = SBUS_CLOCK_RATE;
sparc_config.clear_clock_irq = sun4m_clear_clock_irq;
sparc_config.load_profile_irq = sun4m_load_profile_irq;
/* Cannot enable interrupts until OBP ticker is disabled. */
}
......@@ -268,7 +268,7 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
if (ce->mode & CLOCK_EVT_MODE_PERIODIC)
sun4m_clear_profile_irq(cpu);
else
load_profile_irq(cpu, 0); /* Is this needless? */
sparc_config.load_profile_irq(cpu, 0); /* Is this needless? */
irq_enter();
ce->event_handler(ce);
......
......@@ -95,10 +95,10 @@ irqreturn_t notrace timer_interrupt(int dummy, void *dev_id)
if (timer_cs_enabled) {
write_seqlock(&timer_cs_lock);
timer_cs_internal_counter++;
clear_clock_irq();
sparc_config.clear_clock_irq();
write_sequnlock(&timer_cs_lock);
} else {
clear_clock_irq();
sparc_config.clear_clock_irq();
}
if (timer_ce_enabled)
......@@ -200,12 +200,13 @@ static void percpu_ce_setup(enum clock_event_mode mode,
switch (mode) {
case CLOCK_EVT_MODE_PERIODIC:
load_profile_irq(cpu, SBUS_CLOCK_RATE / HZ);
sparc_config.load_profile_irq(cpu,
SBUS_CLOCK_RATE / HZ);
break;
case CLOCK_EVT_MODE_ONESHOT:
case CLOCK_EVT_MODE_SHUTDOWN:
case CLOCK_EVT_MODE_UNUSED:
load_profile_irq(cpu, 0);
sparc_config.load_profile_irq(cpu, 0);
break;
default:
break;
......@@ -218,7 +219,7 @@ static int percpu_ce_set_next_event(unsigned long delta,
int cpu = __first_cpu(evt->cpumask);
unsigned int next = (unsigned int)delta;
load_profile_irq(cpu, next);
sparc_config.load_profile_irq(cpu, next);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册