Commit 163475eb authored by Corey Minyard's avatar Corey Minyard

ipmi: Remove the proc interface

It has been deprecated long enough, get rid of it.
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
parent 12112293
...@@ -22,14 +22,6 @@ config IPMI_DMI_DECODE ...@@ -22,14 +22,6 @@ config IPMI_DMI_DECODE
if IPMI_HANDLER if IPMI_HANDLER
config IPMI_PROC_INTERFACE
bool 'Provide an interface for IPMI stats in /proc (deprecated)'
depends on PROC_FS
default y
help
Do not use this any more, use sysfs for this info. It will be
removed in future kernel versions.
config IPMI_PANIC_EVENT config IPMI_PANIC_EVENT
bool 'Generate a panic event to all BMCs on a panic' bool 'Generate a panic event to all BMCs on a panic'
help help
......
This diff is collapsed.
...@@ -1588,102 +1588,6 @@ static int try_enable_event_buffer(struct smi_info *smi_info) ...@@ -1588,102 +1588,6 @@ static int try_enable_event_buffer(struct smi_info *smi_info)
return rv; return rv;
} }
#ifdef CONFIG_IPMI_PROC_INTERFACE
static int smi_type_proc_show(struct seq_file *m, void *v)
{
struct smi_info *smi = m->private;
seq_printf(m, "%s\n", si_to_str[smi->io.si_type]);
return 0;
}
static int smi_type_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, smi_type_proc_show, PDE_DATA(inode));
}
static const struct file_operations smi_type_proc_ops = {
.open = smi_type_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int smi_si_stats_proc_show(struct seq_file *m, void *v)
{
struct smi_info *smi = m->private;
seq_printf(m, "interrupts_enabled: %d\n",
smi->io.irq && !smi->interrupt_disabled);
seq_printf(m, "short_timeouts: %u\n",
smi_get_stat(smi, short_timeouts));
seq_printf(m, "long_timeouts: %u\n",
smi_get_stat(smi, long_timeouts));
seq_printf(m, "idles: %u\n",
smi_get_stat(smi, idles));
seq_printf(m, "interrupts: %u\n",
smi_get_stat(smi, interrupts));
seq_printf(m, "attentions: %u\n",
smi_get_stat(smi, attentions));
seq_printf(m, "flag_fetches: %u\n",
smi_get_stat(smi, flag_fetches));
seq_printf(m, "hosed_count: %u\n",
smi_get_stat(smi, hosed_count));
seq_printf(m, "complete_transactions: %u\n",
smi_get_stat(smi, complete_transactions));
seq_printf(m, "events: %u\n",
smi_get_stat(smi, events));
seq_printf(m, "watchdog_pretimeouts: %u\n",
smi_get_stat(smi, watchdog_pretimeouts));
seq_printf(m, "incoming_messages: %u\n",
smi_get_stat(smi, incoming_messages));
return 0;
}
static int smi_si_stats_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, smi_si_stats_proc_show, PDE_DATA(inode));
}
static const struct file_operations smi_si_stats_proc_ops = {
.open = smi_si_stats_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int smi_params_proc_show(struct seq_file *m, void *v)
{
struct smi_info *smi = m->private;
seq_printf(m,
"%s,%s,0x%lx,rsp=%d,rsi=%d,rsh=%d,irq=%d,ipmb=%d\n",
si_to_str[smi->io.si_type],
addr_space_to_str[smi->io.addr_type],
smi->io.addr_data,
smi->io.regspacing,
smi->io.regsize,
smi->io.regshift,
smi->io.irq,
smi->io.slave_addr);
return 0;
}
static int smi_params_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, smi_params_proc_show, PDE_DATA(inode));
}
static const struct file_operations smi_params_proc_ops = {
.open = smi_params_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
#endif
#define IPMI_SI_ATTR(name) \ #define IPMI_SI_ATTR(name) \
static ssize_t ipmi_##name##_show(struct device *dev, \ static ssize_t ipmi_##name##_show(struct device *dev, \
struct device_attribute *attr, \ struct device_attribute *attr, \
...@@ -2172,35 +2076,6 @@ static int try_smi_init(struct smi_info *new_smi) ...@@ -2172,35 +2076,6 @@ static int try_smi_init(struct smi_info *new_smi)
goto out_err; goto out_err;
} }
#ifdef CONFIG_IPMI_PROC_INTERFACE
rv = ipmi_smi_add_proc_entry(new_smi->intf, "type",
&smi_type_proc_ops,
new_smi);
if (rv) {
dev_err(new_smi->io.dev,
"Unable to create proc entry: %d\n", rv);
goto out_err;
}
rv = ipmi_smi_add_proc_entry(new_smi->intf, "si_stats",
&smi_si_stats_proc_ops,
new_smi);
if (rv) {
dev_err(new_smi->io.dev,
"Unable to create proc entry: %d\n", rv);
goto out_err;
}
rv = ipmi_smi_add_proc_entry(new_smi->intf, "params",
&smi_params_proc_ops,
new_smi);
if (rv) {
dev_err(new_smi->io.dev,
"Unable to create proc entry: %d\n", rv);
goto out_err;
}
#endif
/* Don't increment till we know we have succeeded. */ /* Don't increment till we know we have succeeded. */
smi_num++; smi_num++;
......
...@@ -1316,72 +1316,6 @@ static int ssif_detect(struct i2c_client *client, struct i2c_board_info *info) ...@@ -1316,72 +1316,6 @@ static int ssif_detect(struct i2c_client *client, struct i2c_board_info *info)
return rv; return rv;
} }
#ifdef CONFIG_IPMI_PROC_INTERFACE
static int smi_type_proc_show(struct seq_file *m, void *v)
{
seq_puts(m, "ssif\n");
return 0;
}
static int smi_type_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, smi_type_proc_show, inode->i_private);
}
static const struct file_operations smi_type_proc_ops = {
.open = smi_type_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int smi_stats_proc_show(struct seq_file *m, void *v)
{
struct ssif_info *ssif_info = m->private;
seq_printf(m, "sent_messages: %u\n",
ssif_get_stat(ssif_info, sent_messages));
seq_printf(m, "sent_messages_parts: %u\n",
ssif_get_stat(ssif_info, sent_messages_parts));
seq_printf(m, "send_retries: %u\n",
ssif_get_stat(ssif_info, send_retries));
seq_printf(m, "send_errors: %u\n",
ssif_get_stat(ssif_info, send_errors));
seq_printf(m, "received_messages: %u\n",
ssif_get_stat(ssif_info, received_messages));
seq_printf(m, "received_message_parts: %u\n",
ssif_get_stat(ssif_info, received_message_parts));
seq_printf(m, "receive_retries: %u\n",
ssif_get_stat(ssif_info, receive_retries));
seq_printf(m, "receive_errors: %u\n",
ssif_get_stat(ssif_info, receive_errors));
seq_printf(m, "flag_fetches: %u\n",
ssif_get_stat(ssif_info, flag_fetches));
seq_printf(m, "hosed: %u\n",
ssif_get_stat(ssif_info, hosed));
seq_printf(m, "events: %u\n",
ssif_get_stat(ssif_info, events));
seq_printf(m, "watchdog_pretimeouts: %u\n",
ssif_get_stat(ssif_info, watchdog_pretimeouts));
seq_printf(m, "alerts: %u\n",
ssif_get_stat(ssif_info, alerts));
return 0;
}
static int smi_stats_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, smi_stats_proc_show, PDE_DATA(inode));
}
static const struct file_operations smi_stats_proc_ops = {
.open = smi_stats_proc_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
#endif
static int strcmp_nospace(char *s1, char *s2) static int strcmp_nospace(char *s1, char *s2)
{ {
while (*s1 && *s2) { while (*s1 && *s2) {
...@@ -1712,24 +1646,6 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1712,24 +1646,6 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
goto out_remove_attr; goto out_remove_attr;
} }
#ifdef CONFIG_IPMI_PROC_INTERFACE
rv = ipmi_smi_add_proc_entry(ssif_info->intf, "type",
&smi_type_proc_ops,
ssif_info);
if (rv) {
pr_err(PFX "Unable to create proc entry: %d\n", rv);
goto out_err_unreg;
}
rv = ipmi_smi_add_proc_entry(ssif_info->intf, "ssif_stats",
&smi_stats_proc_ops,
ssif_info);
if (rv) {
pr_err(PFX "Unable to create proc entry: %d\n", rv);
goto out_err_unreg;
}
#endif
out: out:
if (rv) { if (rv) {
/* /*
...@@ -1747,11 +1663,6 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) ...@@ -1747,11 +1663,6 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
kfree(resp); kfree(resp);
return rv; return rv;
#ifdef CONFIG_IPMI_PROC_INTERFACE
out_err_unreg:
ipmi_unregister_smi(ssif_info->intf);
#endif
out_remove_attr: out_remove_attr:
device_remove_group(&ssif_info->client->dev, &ipmi_ssif_dev_attr_group); device_remove_group(&ssif_info->client->dev, &ipmi_ssif_dev_attr_group);
dev_set_drvdata(&ssif_info->client->dev, NULL); dev_set_drvdata(&ssif_info->client->dev, NULL);
......
...@@ -240,15 +240,4 @@ static inline void ipmi_free_smi_msg(struct ipmi_smi_msg *msg) ...@@ -240,15 +240,4 @@ static inline void ipmi_free_smi_msg(struct ipmi_smi_msg *msg)
msg->done(msg); msg->done(msg);
} }
#ifdef CONFIG_IPMI_PROC_INTERFACE
/*
* Allow the lower layer to add things to the proc filesystem
* directory for this interface. Note that the entry will
* automatically be dstroyed when the interface is destroyed.
*/
int ipmi_smi_add_proc_entry(struct ipmi_smi *smi, char *name,
const struct file_operations *proc_ops,
void *data);
#endif
#endif /* __LINUX_IPMI_SMI_H */ #endif /* __LINUX_IPMI_SMI_H */
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