Commit 08c9388f authored by Sam Ravnborg's avatar Sam Ravnborg Committed by 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: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4ba22b16
...@@ -321,11 +321,7 @@ extern unsigned int leon_build_device_irq(unsigned int real_irq, ...@@ -321,11 +321,7 @@ extern unsigned int leon_build_device_irq(unsigned int real_irq,
extern void leon_update_virq_handling(unsigned int virq, extern void leon_update_virq_handling(unsigned int virq,
irq_flow_handler_t flow_handler, irq_flow_handler_t flow_handler,
const char *name, int do_ack); 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_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_trans_init(struct device_node *dp);
extern void leon_node_init(struct device_node *dp, struct device_node ***nextp); extern void leon_node_init(struct device_node *dp, struct device_node ***nextp);
extern void leon_init_IRQ(void); extern void leon_init_IRQ(void);
......
...@@ -70,6 +70,9 @@ struct sparc_config { ...@@ -70,6 +70,9 @@ struct sparc_config {
/* function to obtain offsett for cs period */ /* function to obtain offsett for cs period */
unsigned int (*get_cycles_offset)(void); 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; extern struct sparc_config sparc_config;
...@@ -78,27 +81,6 @@ void irq_link(unsigned int irq); ...@@ -78,27 +81,6 @@ void irq_link(unsigned int irq);
void irq_unlink(unsigned int irq); void irq_unlink(unsigned int irq);
void handler_irq(unsigned int pil, struct pt_regs *regs); 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); unsigned long leon_get_irqmask(unsigned int irq);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
...@@ -463,11 +463,11 @@ void __init leon_init_timers(void) ...@@ -463,11 +463,11 @@ void __init leon_init_timers(void)
return; 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)
{ {
} }
...@@ -518,11 +518,8 @@ void __init leon_init_IRQ(void) ...@@ -518,11 +518,8 @@ void __init leon_init_IRQ(void)
sparc_config.init_timers = leon_init_timers; sparc_config.init_timers = leon_init_timers;
sparc_config.build_device_irq = _leon_build_device_irq; sparc_config.build_device_irq = _leon_build_device_irq;
sparc_config.clock_rate = 1000000; sparc_config.clock_rate = 1000000;
sparc_config.clear_clock_irq = leon_clear_clock_irq;
BTFIXUPSET_CALL(clear_clock_irq, leon_clear_clock_irq, sparc_config.load_profile_irq = leon_load_profile_irq;
BTFIXUPCALL_NORM);
BTFIXUPSET_CALL(load_profile_irq, leon_load_profile_irq,
BTFIXUPCALL_NOP);
} }
void __init leon_init(void) void __init leon_init(void)
......
...@@ -880,9 +880,8 @@ static void pcic_load_profile_irq(int cpu, unsigned int limit) ...@@ -880,9 +880,8 @@ static void pcic_load_profile_irq(int cpu, unsigned int limit)
void __init sun4m_pci_init_IRQ(void) void __init sun4m_pci_init_IRQ(void)
{ {
sparc_config.build_device_irq = pcic_build_device_irq; sparc_config.build_device_irq = pcic_build_device_irq;
sparc_config.clear_clock_irq = pcic_clear_clock_irq;
BTFIXUPSET_CALL(clear_clock_irq, pcic_clear_clock_irq, BTFIXUPCALL_NORM); sparc_config.load_profile_irq = pcic_load_profile_irq;
BTFIXUPSET_CALL(load_profile_irq, pcic_load_profile_irq, BTFIXUPCALL_NORM);
} }
int pcibios_assign_resource(struct pci_dev *pdev, int resource) int pcibios_assign_resource(struct pci_dev *pdev, int resource)
......
...@@ -506,12 +506,11 @@ void __init sun4d_init_IRQ(void) ...@@ -506,12 +506,11 @@ void __init sun4d_init_IRQ(void)
{ {
local_irq_disable(); 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.init_timers = sun4d_init_timers;
sparc_config.build_device_irq = sun4d_build_device_irq; sparc_config.build_device_irq = sun4d_build_device_irq;
sparc_config.clock_rate = SBUS_CLOCK_RATE; 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. */ /* Cannot enable interrupts until OBP ticker is disabled. */
} }
...@@ -462,12 +462,12 @@ void __init sun4m_init_IRQ(void) ...@@ -462,12 +462,12 @@ void __init sun4m_init_IRQ(void)
if (num_cpu_iregs == 4) if (num_cpu_iregs == 4)
sbus_writel(0, &sun4m_irq_global->interrupt_target); 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.build_device_irq = sun4m_build_device_irq;
sparc_config.clock_rate = SBUS_CLOCK_RATE; 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. */ /* Cannot enable interrupts until OBP ticker is disabled. */
} }
...@@ -268,7 +268,7 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs) ...@@ -268,7 +268,7 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
if (ce->mode & CLOCK_EVT_MODE_PERIODIC) if (ce->mode & CLOCK_EVT_MODE_PERIODIC)
sun4m_clear_profile_irq(cpu); sun4m_clear_profile_irq(cpu);
else else
load_profile_irq(cpu, 0); /* Is this needless? */ sparc_config.load_profile_irq(cpu, 0); /* Is this needless? */
irq_enter(); irq_enter();
ce->event_handler(ce); ce->event_handler(ce);
......
...@@ -95,10 +95,10 @@ irqreturn_t notrace timer_interrupt(int dummy, void *dev_id) ...@@ -95,10 +95,10 @@ irqreturn_t notrace timer_interrupt(int dummy, void *dev_id)
if (timer_cs_enabled) { if (timer_cs_enabled) {
write_seqlock(&timer_cs_lock); write_seqlock(&timer_cs_lock);
timer_cs_internal_counter++; timer_cs_internal_counter++;
clear_clock_irq(); sparc_config.clear_clock_irq();
write_sequnlock(&timer_cs_lock); write_sequnlock(&timer_cs_lock);
} else { } else {
clear_clock_irq(); sparc_config.clear_clock_irq();
} }
if (timer_ce_enabled) if (timer_ce_enabled)
...@@ -200,12 +200,13 @@ static void percpu_ce_setup(enum clock_event_mode mode, ...@@ -200,12 +200,13 @@ static void percpu_ce_setup(enum clock_event_mode mode,
switch (mode) { switch (mode) {
case CLOCK_EVT_MODE_PERIODIC: case CLOCK_EVT_MODE_PERIODIC:
load_profile_irq(cpu, SBUS_CLOCK_RATE / HZ); sparc_config.load_profile_irq(cpu,
SBUS_CLOCK_RATE / HZ);
break; break;
case CLOCK_EVT_MODE_ONESHOT: case CLOCK_EVT_MODE_ONESHOT:
case CLOCK_EVT_MODE_SHUTDOWN: case CLOCK_EVT_MODE_SHUTDOWN:
case CLOCK_EVT_MODE_UNUSED: case CLOCK_EVT_MODE_UNUSED:
load_profile_irq(cpu, 0); sparc_config.load_profile_irq(cpu, 0);
break; break;
default: default:
break; break;
...@@ -218,7 +219,7 @@ static int percpu_ce_set_next_event(unsigned long delta, ...@@ -218,7 +219,7 @@ static int percpu_ce_set_next_event(unsigned long delta,
int cpu = __first_cpu(evt->cpumask); int cpu = __first_cpu(evt->cpumask);
unsigned int next = (unsigned int)delta; unsigned int next = (unsigned int)delta;
load_profile_irq(cpu, next); sparc_config.load_profile_irq(cpu, next);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment