Received: by 10.213.65.68 with SMTP id h4csp827661imn; Tue, 27 Mar 2018 09:30:37 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Np2MfmozHQBLJW1jJLXNSSW/u5hxtGX1BS/9BMVCGw1mXYwBkbGz5XN/GqzI6DS/4xN+c X-Received: by 10.101.101.217 with SMTP id y25mr6506pgv.165.1522168237283; Tue, 27 Mar 2018 09:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522168237; cv=none; d=google.com; s=arc-20160816; b=FomNFx8311W8aJEXnnNlrUdX8ZFIctSHMPyrSyDN+rcMvzb+md4MJ8w/dhD9HOlFe0 bhEL7Ai7SAjvbRVD/NeUYTpqG0cVryxshwJ5coDgvEW+p10PVsi0dmFQSyPBZ4btLXo8 mgIHcm+c/7RuWbP2qfe08nS7MQ/+tSgmYXWY9SBt03cWBCk4NzffbSLwYiHSvjEOeZjD viFgx0G9UzTuSrbhYXOtAsuDV9PiXc6nK+7XXjenVg14hTOv3zRQhGbvMiQwmQhoqVI0 wZmU6pXM516ipLcsqspT1O4tK+EX5RMHd8keayr3TKqYw/Xv92tqcKLgcCz33/9zhImC 1IGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=euisgbepjWDY3qN6Uzt3vMacRxSy5Lu3yHrMVDxFlr4=; b=mF5OhAPDAqjitRbZ3OTKkPjubwvnBrblQ4NJNcYH/7S29fLZNnaqxxLjhoBdjJVbaz Fr5X9LgO7SJ2CgZ5x+RRiqhBqSgKKqNWeEto7zEdRzm9EIikYxF/FBzSCYdOlMabaV/I /GnyVNS560DWUJNYSZFS+9+HK6FUSPzDCcINqyniK4NWVH9V8+T9rggtIVJxdgT4jPHs JsT57GG0XJnxVrTtxj1Re3kk5WKIkcxku9tyNMVwGEmILG/xjqUYj+m7hu9Gc8NvV/ON bkjHJjgAFWXEJil0BUH0GUiIsLfxnt/qdQoAuptsEG6j+EyHEkVqTrzvl0QWLD+2Ixyw Cs5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i21si1304196pfk.34.2018.03.27.09.30.20; Tue, 27 Mar 2018 09:30:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752125AbeC0Q2k (ORCPT + 99 others); Tue, 27 Mar 2018 12:28:40 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40906 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbeC0Q2i (ORCPT ); Tue, 27 Mar 2018 12:28:38 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3967D1022; Tue, 27 Mar 2018 16:28:38 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, NeilBrown , John Crispin , Ralf Baechle , linux-mips@linux-mips.org, James Hogan Subject: [PATCH 4.4 01/43] MIPS: ralink: Remove ralink_halt() Date: Tue, 27 Mar 2018 18:27:05 +0200 Message-Id: <20180327162716.495221326@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162716.407986916@linuxfoundation.org> References: <20180327162716.407986916@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: NeilBrown commit 891731f6a5dbe508d12443175a7e166a2fba616a upstream. ralink_halt() does nothing that machine_halt() doesn't already do, so it adds no value. It actually causes incorrect behaviour due to the "unreachable()" at the end. This tells the compiler that the end of the function will never be reached, which isn't true. The compiler responds by not adding a 'return' instruction, so control simply moves on to whatever bytes come afterwards in memory. In my tested, that was the ralink_restart() function. This means that an attempt to 'halt' the machine would actually cause a reboot. So remove ralink_halt() so that a 'halt' really does halt. Fixes: c06e836ada59 ("MIPS: ralink: adds reset code") Signed-off-by: NeilBrown Cc: John Crispin Cc: Ralf Baechle Cc: linux-mips@linux-mips.org Cc: # 3.9+ Patchwork: https://patchwork.linux-mips.org/patch/18851/ Signed-off-by: James Hogan Signed-off-by: Greg Kroah-Hartman --- arch/mips/ralink/reset.c | 7 ------- 1 file changed, 7 deletions(-) --- a/arch/mips/ralink/reset.c +++ b/arch/mips/ralink/reset.c @@ -96,16 +96,9 @@ static void ralink_restart(char *command unreachable(); } -static void ralink_halt(void) -{ - local_irq_disable(); - unreachable(); -} - static int __init mips_reboot_setup(void) { _machine_restart = ralink_restart; - _machine_halt = ralink_halt; return 0; }