mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 12:06:22 +07:00
ipmi_si: Rename function to add smi, make it global
Getting ready for moving the platform-specific stuff into their own files. Signed-off-by: Corey Minyard <cminyard@mvista.com>
This commit is contained in:
parent
3fd32f9ec8
commit
1e89a499e5
18
drivers/char/ipmi/ipmi_si.h
Normal file
18
drivers/char/ipmi/ipmi_si.h
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* ipmi_si.h
|
||||
*
|
||||
* Interface from the device-specific interfaces (OF, DMI, ACPI, PCI,
|
||||
* etc) to the base ipmi system interface code.
|
||||
*/
|
||||
|
||||
#include "ipmi_si_sm.h"
|
||||
|
||||
#define IPMI_IO_ADDR_SPACE 0
|
||||
#define IPMI_MEM_ADDR_SPACE 1
|
||||
|
||||
#define DEFAULT_REGSPACING 1
|
||||
#define DEFAULT_REGSIZE 1
|
||||
|
||||
struct smi_info;
|
||||
|
||||
int ipmi_si_add_smi(struct smi_info *info);
|
@ -60,7 +60,7 @@
|
||||
#include <linux/ipmi.h>
|
||||
#include <linux/ipmi_smi.h>
|
||||
#include <asm/io.h>
|
||||
#include "ipmi_si_sm.h"
|
||||
#include "ipmi_si.h"
|
||||
#include "ipmi_dmi.h"
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/string.h>
|
||||
@ -332,7 +332,6 @@ static int num_max_busy_us;
|
||||
|
||||
static bool unload_when_empty = true;
|
||||
|
||||
static int add_smi(struct smi_info *smi);
|
||||
static int try_smi_init(struct smi_info *smi);
|
||||
static void cleanup_one_si(struct smi_info *to_clean);
|
||||
static void cleanup_ipmi_si(void);
|
||||
@ -1310,9 +1309,6 @@ static LIST_HEAD(smi_infos);
|
||||
static DEFINE_MUTEX(smi_infos_lock);
|
||||
static int smi_num; /* Used to sequence the SMIs */
|
||||
|
||||
#define DEFAULT_REGSPACING 1
|
||||
#define DEFAULT_REGSIZE 1
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static bool si_tryacpi = true;
|
||||
#endif
|
||||
@ -1341,8 +1337,6 @@ static unsigned int num_regshifts;
|
||||
static int slave_addrs[SI_MAX_PARMS]; /* Leaving 0 chooses the default value */
|
||||
static unsigned int num_slave_addrs;
|
||||
|
||||
#define IPMI_IO_ADDR_SPACE 0
|
||||
#define IPMI_MEM_ADDR_SPACE 1
|
||||
static const char * const addr_space_to_str[] = { "i/o", "mem" };
|
||||
|
||||
static int hotmod_handler(const char *val, struct kernel_param *kp);
|
||||
@ -1950,7 +1944,7 @@ static int hotmod_handler(const char *val, struct kernel_param *kp)
|
||||
info->irq_setup = std_irq_setup;
|
||||
info->slave_addr = ipmb;
|
||||
|
||||
rv = add_smi(info);
|
||||
rv = ipmi_si_add_smi(info);
|
||||
if (rv) {
|
||||
kfree(info);
|
||||
goto out;
|
||||
@ -2044,7 +2038,7 @@ static int hardcode_find_bmc(void)
|
||||
info->irq_setup = std_irq_setup;
|
||||
info->slave_addr = slave_addrs[i];
|
||||
|
||||
if (!add_smi(info)) {
|
||||
if (!ipmi_si_add_smi(info)) {
|
||||
mutex_lock(&smi_infos_lock);
|
||||
if (try_smi_init(info))
|
||||
cleanup_one_si(info);
|
||||
@ -2244,7 +2238,7 @@ static int try_init_spmi(struct SPMITable *spmi)
|
||||
info->io.addr_data, info->io.regsize, info->io.regspacing,
|
||||
info->irq);
|
||||
|
||||
rv = add_smi(info);
|
||||
rv = ipmi_si_add_smi(info);
|
||||
if (rv)
|
||||
kfree(info);
|
||||
|
||||
@ -2380,7 +2374,7 @@ static int dmi_ipmi_probe(struct platform_device *pdev)
|
||||
info->io.addr_data, info->io.regsize, info->io.regspacing,
|
||||
info->irq);
|
||||
|
||||
if (add_smi(info))
|
||||
if (ipmi_si_add_smi(info))
|
||||
kfree(info);
|
||||
|
||||
return 0;
|
||||
@ -2515,7 +2509,7 @@ static int ipmi_pci_probe(struct pci_dev *pdev,
|
||||
&pdev->resource[0], info->io.regsize, info->io.regspacing,
|
||||
info->irq);
|
||||
|
||||
rv = add_smi(info);
|
||||
rv = ipmi_si_add_smi(info);
|
||||
if (rv) {
|
||||
kfree(info);
|
||||
pci_disable_device(pdev);
|
||||
@ -2635,7 +2629,7 @@ static int of_ipmi_probe(struct platform_device *dev)
|
||||
|
||||
dev_set_drvdata(&dev->dev, info);
|
||||
|
||||
ret = add_smi(info);
|
||||
ret = ipmi_si_add_smi(info);
|
||||
if (ret) {
|
||||
kfree(info);
|
||||
return ret;
|
||||
@ -2760,7 +2754,7 @@ static int acpi_ipmi_probe(struct platform_device *dev)
|
||||
res, info->io.regsize, info->io.regspacing,
|
||||
info->irq);
|
||||
|
||||
rv = add_smi(info);
|
||||
rv = ipmi_si_add_smi(info);
|
||||
if (rv)
|
||||
kfree(info);
|
||||
|
||||
@ -2842,7 +2836,7 @@ static int __init ipmi_parisc_probe(struct parisc_device *dev)
|
||||
|
||||
dev_set_drvdata(&dev->dev, info);
|
||||
|
||||
rv = add_smi(info);
|
||||
rv = ipmi_si_add_smi(info);
|
||||
if (rv) {
|
||||
kfree(info);
|
||||
return rv;
|
||||
@ -3448,7 +3442,7 @@ static struct smi_info *find_dup_si(struct smi_info *info)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int add_smi(struct smi_info *new_smi)
|
||||
int ipmi_si_add_smi(struct smi_info *new_smi)
|
||||
{
|
||||
int rv = 0;
|
||||
struct smi_info *dup;
|
||||
|
Loading…
Reference in New Issue
Block a user