提交 bc451ef9 编写于 作者: G Gu Zitao 提交者: Zheng Zengkai

sw64: fix some compile errors

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I56QAM

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

This patch fixes compile errors for CONFIG_KGDB=y, CONFIG_KEXEC=y and
CONFIG_MEMORY_HOTPLUG=y.

These compile errors are caused by kernel version upgrade. The related
codes have changed. Now fix them according to upstream.
Signed-off-by: NGu Zitao <guzitao@wxiat.com>
Signed-off-by: NGu Zitao <guzitao@wxiat.com>
Signed-off-by: NGu Zitao <guzitao@wxiat.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 9605c4e9
......@@ -139,12 +139,12 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc)
pr_info("AFTER SET PC IS %lx\n", instruction_pointer(regs));
}
static void kgdb_call_nmi_hook(void *ignored)
void kgdb_call_nmi_hook(void *ignored)
{
kgdb_nmicallback(raw_smp_processor_id(), NULL);
}
void kgdb_roundup_cpus(unsigned long flags)
void kgdb_roundup_cpus(void)
{
local_irq_enable();
smp_call_function(kgdb_call_nmi_hook, NULL, 0);
......@@ -228,6 +228,6 @@ void kgdb_arch_exit(void)
* sw64 instructions are always in LE.
* Break instruction is encoded in LE format
*/
struct kgdb_arch arch_kgdb_ops = {
const struct kgdb_arch arch_kgdb_ops = {
.gdb_bpt_instr = {0x80, 00, 00, 00}
};
......@@ -147,7 +147,8 @@ static void __init kexec_control_page_init(void)
{
phys_addr_t addr;
addr = memblock_alloc_base(KEXEC_CONTROL_PAGE_SIZE, PAGE_SIZE, KTEXT_MAX);
addr = memblock_phys_alloc_range(KEXEC_CONTROL_PAGE_SIZE, PAGE_SIZE,
0, KTEXT_MAX);
kexec_control_page = (void *)(__START_KERNEL_map + addr);
}
......
......@@ -312,14 +312,13 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
#endif
#ifdef CONFIG_MEMORY_HOTPLUG
int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap,
bool want_memblock)
int arch_add_memory(int nid, u64 start, u64 size, struct mhp_params *params)
{
unsigned long start_pfn = start >> PAGE_SHIFT;
unsigned long nr_pages = size >> PAGE_SHIFT;
int ret;
ret = __add_pages(nid, start_pfn, nr_pages, altmap, want_memblock);
ret = __add_pages(nid, start_pfn, nr_pages, params);
if (ret)
printk("%s: Problem encountered in __add_pages() as ret=%d\n",
__func__, ret);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册