aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2012-05-14 11:30:35 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-14 17:05:08 -0400
commit08c9388f5816ac9285dce7d07c8867ae1c1e4bcb (patch)
treeb2de0ea20a6187a9375b6fa1f9c5a6193d95786c /arch
parent4ba22b16bbf354822b7988ec5b4b35774dcd479f (diff)
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: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/leon.h4
-rw-r--r--arch/sparc/kernel/irq.h24
-rw-r--r--arch/sparc/kernel/leon_kernel.c13
-rw-r--r--arch/sparc/kernel/pcic.c5
-rw-r--r--arch/sparc/kernel/sun4d_irq.c5
-rw-r--r--arch/sparc/kernel/sun4m_irq.c8
-rw-r--r--arch/sparc/kernel/sun4m_smp.c2
-rw-r--r--arch/sparc/kernel/time_32.c11
8 files changed, 23 insertions, 49 deletions
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h
index cf35a26454c8..8095be271825 100644
--- a/arch/sparc/include/asm/leon.h
+++ b/arch/sparc/include/asm/leon.h
@@ -321,11 +321,7 @@ extern unsigned int leon_build_device_irq(unsigned int real_irq,
321extern void leon_update_virq_handling(unsigned int virq, 321extern void leon_update_virq_handling(unsigned int virq,
322 irq_flow_handler_t flow_handler, 322 irq_flow_handler_t flow_handler,
323 const char *name, int do_ack); 323 const char *name, int do_ack);
324extern void leon_clear_clock_irq(void);
325extern void leon_load_profile_irq(int cpu, unsigned int limit);
326extern void leon_init_timers(void); 324extern void leon_init_timers(void);
327extern void leon_clear_clock_irq(void);
328extern void leon_load_profile_irq(int cpu, unsigned int limit);
329extern void leon_trans_init(struct device_node *dp); 325extern void leon_trans_init(struct device_node *dp);
330extern void leon_node_init(struct device_node *dp, struct device_node ***nextp); 326extern void leon_node_init(struct device_node *dp, struct device_node ***nextp);
331extern void leon_init_IRQ(void); 327extern void leon_init_IRQ(void);
diff --git a/arch/sparc/kernel/irq.h b/arch/sparc/kernel/irq.h
index e40ca6c0076a..f558f710ee51 100644
--- a/arch/sparc/kernel/irq.h
+++ b/arch/sparc/kernel/irq.h
@@ -70,6 +70,9 @@ struct sparc_config {
70 70
71 /* function to obtain offsett for cs period */ 71 /* function to obtain offsett for cs period */
72 unsigned int (*get_cycles_offset)(void); 72 unsigned int (*get_cycles_offset)(void);
73
74 void (*clear_clock_irq)(void);
75 void (*load_profile_irq)(int cpu, unsigned int limit);
73}; 76};
74extern struct sparc_config sparc_config; 77extern struct sparc_config sparc_config;
75 78
@@ -78,27 +81,6 @@ void irq_link(unsigned int irq);
78void irq_unlink(unsigned int irq); 81void irq_unlink(unsigned int irq);
79void handler_irq(unsigned int pil, struct pt_regs *regs); 82void handler_irq(unsigned int pil, struct pt_regs *regs);
80 83
81/* Dave Redman (djhr@tadpole.co.uk)
82 * changed these to function pointers.. it saves cycles and will allow
83 * the irq dependencies to be split into different files at a later date
84 * sun4m_irq.c etc so we could reduce the kernel size.
85 * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
86 * Changed these to btfixup entities... It saves cycles :)
87 */
88
89BTFIXUPDEF_CALL(void, clear_clock_irq, void)
90BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
91
92static inline void clear_clock_irq(void)
93{
94 BTFIXUP_CALL(clear_clock_irq)();
95}
96
97static inline void load_profile_irq(int cpu, int limit)
98{
99 BTFIXUP_CALL(load_profile_irq)(cpu, limit);
100}
101
102unsigned long leon_get_irqmask(unsigned int irq); 84unsigned long leon_get_irqmask(unsigned int irq);
103 85
104#ifdef CONFIG_SMP 86#ifdef CONFIG_SMP
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c
index 1770b3c1cc74..77c1b916e4dd 100644
--- a/arch/sparc/kernel/leon_kernel.c
+++ b/arch/sparc/kernel/leon_kernel.c
@@ -463,11 +463,11 @@ bad:
463 return; 463 return;
464} 464}
465 465
466void leon_clear_clock_irq(void) 466static void leon_clear_clock_irq(void)
467{ 467{
468} 468}
469 469
470void leon_load_profile_irq(int cpu, unsigned int limit) 470static void leon_load_profile_irq(int cpu, unsigned int limit)
471{ 471{
472} 472}
473 473
@@ -517,12 +517,9 @@ void __init leon_init_IRQ(void)
517{ 517{
518 sparc_config.init_timers = leon_init_timers; 518 sparc_config.init_timers = leon_init_timers;
519 sparc_config.build_device_irq = _leon_build_device_irq; 519 sparc_config.build_device_irq = _leon_build_device_irq;
520 sparc_config.clock_rate = 1000000; 520 sparc_config.clock_rate = 1000000;
521 521 sparc_config.clear_clock_irq = leon_clear_clock_irq;
522 BTFIXUPSET_CALL(clear_clock_irq, leon_clear_clock_irq, 522 sparc_config.load_profile_irq = leon_load_profile_irq;
523 BTFIXUPCALL_NORM);
524 BTFIXUPSET_CALL(load_profile_irq, leon_load_profile_irq,
525 BTFIXUPCALL_NOP);
526} 523}
527 524
528void __init leon_init(void) 525void __init leon_init(void)
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index f0ec9396a408..ded3f6090c3f 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -880,9 +880,8 @@ static void pcic_load_profile_irq(int cpu, unsigned int limit)
880void __init sun4m_pci_init_IRQ(void) 880void __init sun4m_pci_init_IRQ(void)
881{ 881{
882 sparc_config.build_device_irq = pcic_build_device_irq; 882 sparc_config.build_device_irq = pcic_build_device_irq;
883 883 sparc_config.clear_clock_irq = pcic_clear_clock_irq;
884 BTFIXUPSET_CALL(clear_clock_irq, pcic_clear_clock_irq, BTFIXUPCALL_NORM); 884 sparc_config.load_profile_irq = pcic_load_profile_irq;
885 BTFIXUPSET_CALL(load_profile_irq, pcic_load_profile_irq, BTFIXUPCALL_NORM);
886} 885}
887 886
888int pcibios_assign_resource(struct pci_dev *pdev, int resource) 887int pcibios_assign_resource(struct pci_dev *pdev, int resource)
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index e8e4f1411585..e490ac9327c7 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -506,12 +506,11 @@ void __init sun4d_init_IRQ(void)
506{ 506{
507 local_irq_disable(); 507 local_irq_disable();
508 508
509 BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM);
510 BTFIXUPSET_CALL(load_profile_irq, sun4d_load_profile_irq, BTFIXUPCALL_NORM);
511
512 sparc_config.init_timers = sun4d_init_timers; 509 sparc_config.init_timers = sun4d_init_timers;
513 sparc_config.build_device_irq = sun4d_build_device_irq; 510 sparc_config.build_device_irq = sun4d_build_device_irq;
514 sparc_config.clock_rate = SBUS_CLOCK_RATE; 511 sparc_config.clock_rate = SBUS_CLOCK_RATE;
512 sparc_config.clear_clock_irq = sun4d_clear_clock_irq;
513 sparc_config.load_profile_irq = sun4d_load_profile_irq;
515 514
516 /* Cannot enable interrupts until OBP ticker is disabled. */ 515 /* Cannot enable interrupts until OBP ticker is disabled. */
517} 516}
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index eb2c277aaf94..c5ade9d27a1d 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -462,12 +462,12 @@ void __init sun4m_init_IRQ(void)
462 if (num_cpu_iregs == 4) 462 if (num_cpu_iregs == 4)
463 sbus_writel(0, &sun4m_irq_global->interrupt_target); 463 sbus_writel(0, &sun4m_irq_global->interrupt_target);
464 464
465 BTFIXUPSET_CALL(clear_clock_irq, sun4m_clear_clock_irq, BTFIXUPCALL_NORM); 465 sparc_config.init_timers = sun4m_init_timers;
466 BTFIXUPSET_CALL(load_profile_irq, sun4m_load_profile_irq, BTFIXUPCALL_NORM);
467
468 sparc_config.init_timers = sun4m_init_timers;
469 sparc_config.build_device_irq = sun4m_build_device_irq; 466 sparc_config.build_device_irq = sun4m_build_device_irq;
470 sparc_config.clock_rate = SBUS_CLOCK_RATE; 467 sparc_config.clock_rate = SBUS_CLOCK_RATE;
468 sparc_config.clear_clock_irq = sun4m_clear_clock_irq;
469 sparc_config.load_profile_irq = sun4m_load_profile_irq;
470
471 471
472 /* Cannot enable interrupts until OBP ticker is disabled. */ 472 /* Cannot enable interrupts until OBP ticker is disabled. */
473} 473}
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
index ee21c4375a90..960e8ab47b12 100644
--- a/arch/sparc/kernel/sun4m_smp.c
+++ b/arch/sparc/kernel/sun4m_smp.c
@@ -268,7 +268,7 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
268 if (ce->mode & CLOCK_EVT_MODE_PERIODIC) 268 if (ce->mode & CLOCK_EVT_MODE_PERIODIC)
269 sun4m_clear_profile_irq(cpu); 269 sun4m_clear_profile_irq(cpu);
270 else 270 else
271 load_profile_irq(cpu, 0); /* Is this needless? */ 271 sparc_config.load_profile_irq(cpu, 0); /* Is this needless? */
272 272
273 irq_enter(); 273 irq_enter();
274 ce->event_handler(ce); 274 ce->event_handler(ce);
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 1e25a7ab1ea5..459cf66c143c 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -95,10 +95,10 @@ irqreturn_t notrace timer_interrupt(int dummy, void *dev_id)
95 if (timer_cs_enabled) { 95 if (timer_cs_enabled) {
96 write_seqlock(&timer_cs_lock); 96 write_seqlock(&timer_cs_lock);
97 timer_cs_internal_counter++; 97 timer_cs_internal_counter++;
98 clear_clock_irq(); 98 sparc_config.clear_clock_irq();
99 write_sequnlock(&timer_cs_lock); 99 write_sequnlock(&timer_cs_lock);
100 } else { 100 } else {
101 clear_clock_irq(); 101 sparc_config.clear_clock_irq();
102 } 102 }
103 103
104 if (timer_ce_enabled) 104 if (timer_ce_enabled)
@@ -200,12 +200,13 @@ static void percpu_ce_setup(enum clock_event_mode mode,
200 200
201 switch (mode) { 201 switch (mode) {
202 case CLOCK_EVT_MODE_PERIODIC: 202 case CLOCK_EVT_MODE_PERIODIC:
203 load_profile_irq(cpu, SBUS_CLOCK_RATE / HZ); 203 sparc_config.load_profile_irq(cpu,
204 SBUS_CLOCK_RATE / HZ);
204 break; 205 break;
205 case CLOCK_EVT_MODE_ONESHOT: 206 case CLOCK_EVT_MODE_ONESHOT:
206 case CLOCK_EVT_MODE_SHUTDOWN: 207 case CLOCK_EVT_MODE_SHUTDOWN:
207 case CLOCK_EVT_MODE_UNUSED: 208 case CLOCK_EVT_MODE_UNUSED:
208 load_profile_irq(cpu, 0); 209 sparc_config.load_profile_irq(cpu, 0);
209 break; 210 break;
210 default: 211 default:
211 break; 212 break;
@@ -218,7 +219,7 @@ static int percpu_ce_set_next_event(unsigned long delta,
218 int cpu = __first_cpu(evt->cpumask); 219 int cpu = __first_cpu(evt->cpumask);
219 unsigned int next = (unsigned int)delta; 220 unsigned int next = (unsigned int)delta;
220 221
221 load_profile_irq(cpu, next); 222 sparc_config.load_profile_irq(cpu, next);
222 return 0; 223 return 0;
223} 224}
224 225