Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4469176pxb; Tue, 18 Jan 2022 20:55:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTgMobGMuVD4Qr2M3+VMYV5nzXnN3+EMVVcigxeJY1qw/8/Yx3jfHiW0heMJyND0Us040R X-Received: by 2002:a05:6a00:174d:b0:4bb:cbd7:c556 with SMTP id j13-20020a056a00174d00b004bbcbd7c556mr29703969pfc.26.1642568134141; Tue, 18 Jan 2022 20:55:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642568134; cv=none; d=google.com; s=arc-20160816; b=S1eAMYjM2ywFqoqFy1qWikuoRbhaD1Q3qoDi3OO0KVrxg+7zkiNEhCfKW3Qd2q8F1U GRAZLk9I91eF0TRMnLSIlwVcBGr2Jp2Y+EdOzWTMkEAb2gjCJGLt6HnxXGJUYnNVjPpR dL8b9bJB9E0h9ESL/uHvntK8y2pRyze00Luma0KhJaqZfA66NiGDpzbYo+IuyM0nPo3V pQKdf7fnNg6Gj+9ofQmkDWrREOSUNj0OiNpEOg3UWhWbrO5qG/Q7Jem+Irk20K6P698C +w0KLcJhF+xPlXrKQbLlYzOPU1F5m1i4hLmZ1yEInhXf2GwGoEUP6xqwO/OMiWGAeKAM UiQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bNP+baGXo9Z0xVsk1X5/BHVlnTUMFg6ncgCLZ6FNP30=; b=LV2BVNo8Emf+3x63elUZoe9UzWyxYYaJATihAV13pNTpyZcYm1l6dzEY1TKBnVb1nn WR8Uinl1KYMq0teULunsfxt40G8IckmdVLIUl3yyWM6bhur15mvgZhpBIOQrS2ViPleD 4o69iGy2g2aJP+mGRhN1cswhFkac0wVH0BSXwW+ZMzRfHAeY7JGO8eoJESI5SfpcNP7Y d6jADUAoBatZSyv3x0yi2huX8aL7hjX4lc+imYUl4sPAx6uI5Rni5RZnLLPj5i99yJXl FbMzEf08vdgLowcE2KZYCmW1G2WPk0DSE9kxBf/ZUhAqzaZaVbo5n6AXwlPxvt9U8naA Rz1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FFquYUuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id na11si5741996pjb.37.2022.01.18.20.55.10; Tue, 18 Jan 2022 20:55:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FFquYUuk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349769AbiARCuR (ORCPT + 99 others); Mon, 17 Jan 2022 21:50:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345406AbiARCbb (ORCPT ); Mon, 17 Jan 2022 21:31:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B226AC06175D; Mon, 17 Jan 2022 18:29:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 521516114D; Tue, 18 Jan 2022 02:29:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57983C36AEF; Tue, 18 Jan 2022 02:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472948; bh=SwHp8z8g4fBVnumYsGHPVujRk5tCwr58kzWwwIKJFhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FFquYUukTAjIn3vWR3lQlNliqi3kEfKhB6S4FiPrtWXSWzkl9zd1tEYBbeFqELzcv V0DunSeWE2F4xHzCvvaMnCveSjpDmnzx106iyngWjvwWOJNpREzGUd3zUTYwNeB0ga HMcm7PHvUa1wkJeFbd8Gpj7i+wNo3ECt5gevfbLyELtvDkd35S62Rulm5z/pfqTeS/ yniTdiXfKR/B4Ng7MGw3RAdgfisC2T+Iv3sdxvIt51hOwYInkFaeD8BoMLz/UaS73d +NiEmsu36X3X+0Cob+exOfFxSm2Oxkqr5XrWxhD4PeDeKImeFNkXYnqceMU/J/malT +XFwY+LK2qxgA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Randy Dunlap , Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org, Sasha Levin , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, viro@zeniv.linux.org.uk Subject: [PATCH AUTOSEL 5.16 171/217] um: registers: Rename function names to avoid conflicts and build problems Date: Mon, 17 Jan 2022 21:18:54 -0500 Message-Id: <20220118021940.1942199-171-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220118021940.1942199-1-sashal@kernel.org> References: <20220118021940.1942199-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap [ Upstream commit 077b7320942b64b0da182aefd83c374462a65535 ] The function names init_registers() and restore_registers() are used in several net/ethernet/ and gpu/drm/ drivers for other purposes (not calls to UML functions), so rename them. This fixes multiple build errors. Signed-off-by: Randy Dunlap Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Richard Weinberger Signed-off-by: Sasha Levin --- arch/um/include/shared/registers.h | 4 ++-- arch/um/os-Linux/registers.c | 4 ++-- arch/um/os-Linux/start_up.c | 2 +- arch/x86/um/syscalls_64.c | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/um/include/shared/registers.h b/arch/um/include/shared/registers.h index 0c50fa6e8a55b..fbb709a222839 100644 --- a/arch/um/include/shared/registers.h +++ b/arch/um/include/shared/registers.h @@ -16,8 +16,8 @@ extern int restore_fp_registers(int pid, unsigned long *fp_regs); extern int save_fpx_registers(int pid, unsigned long *fp_regs); extern int restore_fpx_registers(int pid, unsigned long *fp_regs); extern int save_registers(int pid, struct uml_pt_regs *regs); -extern int restore_registers(int pid, struct uml_pt_regs *regs); -extern int init_registers(int pid); +extern int restore_pid_registers(int pid, struct uml_pt_regs *regs); +extern int init_pid_registers(int pid); extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs); extern unsigned long get_thread_reg(int reg, jmp_buf *buf); extern int get_fp_registers(int pid, unsigned long *regs); diff --git a/arch/um/os-Linux/registers.c b/arch/um/os-Linux/registers.c index 2d9270508e156..b123955be7acc 100644 --- a/arch/um/os-Linux/registers.c +++ b/arch/um/os-Linux/registers.c @@ -21,7 +21,7 @@ int save_registers(int pid, struct uml_pt_regs *regs) return 0; } -int restore_registers(int pid, struct uml_pt_regs *regs) +int restore_pid_registers(int pid, struct uml_pt_regs *regs) { int err; @@ -36,7 +36,7 @@ int restore_registers(int pid, struct uml_pt_regs *regs) static unsigned long exec_regs[MAX_REG_NR]; static unsigned long exec_fp_regs[FP_SIZE]; -int init_registers(int pid) +int init_pid_registers(int pid) { int err; diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 8a72c99994eb1..e3ee4db58b40d 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c @@ -368,7 +368,7 @@ void __init os_early_checks(void) check_tmpexec(); pid = start_ptraced_child(); - if (init_registers(pid)) + if (init_pid_registers(pid)) fatal("Failed to initialize default registers"); stop_ptraced_child(pid, 1, 1); } diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c index 58f51667e2e4b..8249685b40960 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x86/um/syscalls_64.c @@ -11,6 +11,7 @@ #include #include /* XXX This should get the constants from libc */ #include +#include long arch_prctl(struct task_struct *task, int option, unsigned long __user *arg2) @@ -35,7 +36,7 @@ long arch_prctl(struct task_struct *task, int option, switch (option) { case ARCH_SET_FS: case ARCH_SET_GS: - ret = restore_registers(pid, ¤t->thread.regs.regs); + ret = restore_pid_registers(pid, ¤t->thread.regs.regs); if (ret) return ret; break; -- 2.34.1