Skip to contentSkip to conversation

ia64: sn: Drop unused function

PATCH In review Thomas Gleixner 2 participants 4 messages Mar 25, 2011 – Mar 30, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 12/23 ia64: sn: Drop unused function

Leftover from the irq chip conversion.

---
 arch/ia64/sn/kernel/irq.c |   16 ----------------
 1 file changed, 16 deletions(-)

Index: linux-2.6-tip/arch/ia64/sn/kernel/irq.c =================================--- linux-2.6-tip.orig/arch/ia64/sn/kernel/irq.c +++ linux-2.6-tip/arch/ia64/sn/kernel/irq.c
@@ -23,11 +23,9 @@
#include <asm/sn/sn_sal.h>
#include <asm/sn/sn_feature_sets.h>

-static void force_interrupt(int irq);
static void register_intr_pda(struct sn_irq_info *sn_irq_info); static void unregister_intr_pda(struct sn_irq_info *sn_irq_info);

-int sn_force_interrupt_flag = 1;
extern int sn_ioif_inited;
struct list_head **sn_irq_lh;
static DEFINE_SPINLOCK(sn_irq_info_lock); /* non-IRQ lock */
@@ -423,20 +421,6 @@ sn_call_force_intr_provider(struct sn_ir
(*pci_provider->force_interrupt)(sn_irq_info);
}

-static void force_interrupt(int irq)
-{
- struct sn_irq_info *sn_irq_info;
-
- if (!sn_ioif_inited)
- return;
-
- rcu_read_lock();
- list_for_each_entry_rcu(sn_irq_info, sn_irq_lh[irq], list)
- sn_call_force_intr_provider(sn_irq_info);
-
- rcu_read_unlock();
-}
-
/*
* Check for lost interrupts. If the PIC int_status reg. says that
* an interrupt has been sent, but not handled, and the interrupt

#1 lore raw
Quoted 1 line · Thomas Gleixner

Leftover from the irq chip conversion.

...

Quoted 1 line

-int sn_force_interrupt_flag = 1;

This seems to be still used ... 2.6.39-rc1 fails to build with:

arch/ia64/sn/built-in.o: In function 'sn_force_interrupt_show':
sn_proc_fs.c:(.text+0xdc21): undefined reference to 'sn_force_interrupt_flag'

-Tony

[Sorry I didn't find this before it went upstream]

#2 lore raw
In reply to Thomas Gleixner
Quoted 1 line
Quoted 1 line

-int sn_force_interrupt_flag = 1;

Just deleting all the sysfs bits that touch this from .../sn_proc_fs.c fixes the build
and my system seems to boot normally. Patch attached (because I'm sure that gmail's web interface will mangle it).

There is one new build warning that looks like it comes from this set of changes:

arch/ia64/sn/kernel/irq.c:415: warning: passing argument 1 of 'irqd_irq_disabled' makes pointer from integer without a cast

-Tony

commit 5e42d10adcf717e0cf10ae5da4998d5b74889db0

Author: Tony Luck <[email protected]>
Date:   Tue Mar 29 17:22:23 2011 -0700

[IA64] Fix build breakage - sn_force_interrupt_flag: undefined

Latest irq changes removed the need for this forcing flag, and the definition - but missed the code that allowed it to be tweaked via /proc. Delete accessor functions too.

arch/ia64/sn/kernel/sn2/sn_proc_fs.c +0 -42
index c76d8dc..7aab87f 100644
@@ -45,38 +45,6 @@ static int licenseID_open(struct inode *inode, struct file *file)
 	return single_open(file, licenseID_show, NULL);
 }
 
-/*
- * Enable forced interrupt by default.
- * When set, the sn interrupt handler writes the force interrupt register on
- * the bridge chip.  The hardware will then send an interrupt message if the
- * interrupt line is active.  This mimics a level sensitive interrupt.
- */
-extern int sn_force_interrupt_flag;
-
-static int sn_force_interrupt_show(struct seq_file *s, void *p)
-{
-	seq_printf(s, "Force interrupt is %s\n",
-		sn_force_interrupt_flag ? "enabled" : "disabled");
-	return 0;
-}
-
-static ssize_t sn_force_interrupt_write_proc(struct file *file,
-		const char __user *buffer, size_t count, loff_t *data)
-{
-	char val;
-
-	if (copy_from_user(&val, buffer, 1))
-		return -EFAULT;
-
-	sn_force_interrupt_flag = (val == '0') ? 0 : 1;
-	return count;
-}
-
-static int sn_force_interrupt_open(struct inode *inode, struct file *file)
-{
-	return single_open(file, sn_force_interrupt_show, NULL);
-}
-
 static int coherence_id_show(struct seq_file *s, void *p)
 {
 	seq_printf(s, "%d\n", partition_coherence_id());
@@ -114,14 +82,6 @@ static const struct file_operations proc_license_id_fops = {
 	.release	= single_release,
 };
 
-static const struct file_operations proc_sn_force_intr_fops = {
-	.open		= sn_force_interrupt_open,
-	.read		= seq_read,
-	.write		= sn_force_interrupt_write_proc,
-	.llseek		= seq_lseek,
-	.release	= single_release,
-};
-
 static const struct file_operations proc_coherence_id_fops = {
 	.open		= coherence_id_open,
 	.read		= seq_read,
@@ -149,8 +109,6 @@ void register_sn_procfs(void)
 	proc_create("system_serial_number", 0444, sgi_proc_dir,
 		    &proc_system_sn_fops);
 	proc_create("licenseID", 0444, sgi_proc_dir, &proc_license_id_fops);
-	proc_create("sn_force_interrupt", 0644, sgi_proc_dir,
-		    &proc_sn_force_intr_fops);
 	proc_create("coherence_id", 0444, sgi_proc_dir,
 		    &proc_coherence_id_fops);
 	proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops);
#3 lore raw
In reply to Thomas Gleixner
Quoted 9 lines · Tony Luck
Quoted 1 line · Thomas Gleixner

Leftover from the irq chip conversion.

...

Quoted 1 line

-int sn_force_interrupt_flag = 1;

This seems to be still used ... 2.6.39-rc1 fails to build with:

arch/ia64/sn/built-in.o: In function 'sn_force_interrupt_show':
sn_proc_fs.c:(.text+0xdc21): undefined reference to 'sn_force_interrupt_flag'

Hmpf. Missed that as well. So probably that code in sn_proc_fs should be fixed as well, right ?

Thanks,

tglx