提交 682eefba 编写于 作者: X Xingang Wang 提交者: Zheng Zengkai

arm64/mpam: remove __init macro to support driver probe

ascend inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4L735
CVE: NA

---------------------------------------------------

To support device tree boot for arm64 mpam, the __init macro might be
used by the dts driver. This remove the necessary __init macro for the
related functions.
Signed-off-by: NXingang Wang <wangxingang5@huawei.com>
Reviewed-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 20287a73
......@@ -421,7 +421,7 @@ int resctrl_update_groups_config(struct rdtgroup *rdtgrp);
#define RESCTRL_MAX_CLOSID 32
int __init resctrl_group_init(void);
int resctrl_group_init(void);
void post_resctrl_mount(void);
......
......@@ -534,7 +534,7 @@ static void mpam_disable_irqs(void)
* Scheduled by mpam_discovery_complete() once all devices have been created.
* Also scheduled when new devices are probed when new CPUs come online.
*/
static void __init mpam_enable(struct work_struct *work)
static void mpam_enable(struct work_struct *work)
{
int err;
unsigned long flags;
......@@ -761,7 +761,7 @@ static struct mpam_class * __init mpam_class_get(u8 level_idx,
* class/component structures may be allocated.
* Returns the new device, or an ERR_PTR().
*/
struct mpam_device * __init
struct mpam_device *
__mpam_device_create(u8 level_idx, enum mpam_class_types type,
int component_id, const struct cpumask *fw_affinity,
phys_addr_t hwpage_address)
......@@ -810,7 +810,7 @@ __mpam_device_create(u8 level_idx, enum mpam_class_types type,
return dev;
}
void __init mpam_device_set_error_irq(struct mpam_device *dev, u32 irq,
void mpam_device_set_error_irq(struct mpam_device *dev, u32 irq,
u32 flags)
{
unsigned long irq_save_flags;
......@@ -821,7 +821,7 @@ void __init mpam_device_set_error_irq(struct mpam_device *dev, u32 irq,
spin_unlock_irqrestore(&dev->lock, irq_save_flags);
}
void __init mpam_device_set_overflow_irq(struct mpam_device *dev, u32 irq,
void mpam_device_set_overflow_irq(struct mpam_device *dev, u32 irq,
u32 flags)
{
unsigned long irq_save_flags;
......@@ -864,7 +864,7 @@ static inline u16 mpam_cpu_max_pmg(void)
/*
* prepare for initializing devices.
*/
int __init mpam_discovery_start(void)
int mpam_discovery_start(void)
{
if (!mpam_cpus_have_feature())
return -EOPNOTSUPP;
......@@ -1094,7 +1094,7 @@ static int mpam_cpu_offline(unsigned int cpu)
return 0;
}
int __init mpam_discovery_complete(void)
int mpam_discovery_complete(void)
{
int ret = 0;
......@@ -1111,7 +1111,7 @@ int __init mpam_discovery_complete(void)
return ret;
}
void __init mpam_discovery_failed(void)
void mpam_discovery_failed(void)
{
struct mpam_class *class, *tmp;
......
......@@ -329,7 +329,7 @@ int mpam_resctrl_setup(void);
struct raw_resctrl_resource *
mpam_get_raw_resctrl_resource(u32 level);
int __init mpam_resctrl_init(void);
int mpam_resctrl_init(void);
int mpam_resctrl_set_default_cpu(unsigned int cpu);
void mpam_resctrl_clear_default_cpu(unsigned int cpu);
......
......@@ -2167,7 +2167,7 @@ static int __init mpam_setup(char *str)
}
__setup("mpam", mpam_setup);
int __init mpam_resctrl_init(void)
int mpam_resctrl_init(void)
{
mpam_init_padding();
......
......@@ -1156,7 +1156,7 @@ static int __init resctrl_group_setup_root(void)
*
* Return: 0 on success or -errno
*/
int __init resctrl_group_init(void)
int resctrl_group_init(void)
{
int ret = 0;
......
......@@ -16,7 +16,7 @@ enum mpam_class_types {
MPAM_CLASS_UNKNOWN, /* Everything else, e.g. TLBs etc */
};
struct mpam_device * __init
struct mpam_device *
__mpam_device_create(u8 level_idx, enum mpam_class_types type,
int component_id, const struct cpumask *fw_affinity,
phys_addr_t hwpage_address);
......@@ -54,9 +54,9 @@ mpam_device_create_memory(int nid, phys_addr_t hwpage_address)
return __mpam_device_create(~0, MPAM_CLASS_MEMORY, nid,
&dev_affinity, hwpage_address);
}
int __init mpam_discovery_start(void);
int __init mpam_discovery_complete(void);
void __init mpam_discovery_failed(void);
int mpam_discovery_start(void);
int mpam_discovery_complete(void);
void mpam_discovery_failed(void);
enum mpam_enable_type {
MPAM_ENABLE_DENIED = 0,
......@@ -71,12 +71,12 @@ extern enum mpam_enable_type mpam_enabled;
#define mpam_irq_flags_to_acpi(x) ((x & MPAM_IRQ_MODE_LEVEL) ? \
ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE)
void __init mpam_device_set_error_irq(struct mpam_device *dev, u32 irq,
void mpam_device_set_error_irq(struct mpam_device *dev, u32 irq,
u32 flags);
void __init mpam_device_set_overflow_irq(struct mpam_device *dev, u32 irq,
void mpam_device_set_overflow_irq(struct mpam_device *dev, u32 irq,
u32 flags);
static inline int __init mpam_register_device_irq(struct mpam_device *dev,
static inline int mpam_register_device_irq(struct mpam_device *dev,
u32 overflow_interrupt, u32 overflow_flags,
u32 error_interrupt, u32 error_flags)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册