From patchwork Tue Nov 1 23:05:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?0L3QsNCx?= X-Patchwork-Id: 13027606 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F20F8C4332F for ; Tue, 1 Nov 2022 23:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231258AbiKAXFh (ORCPT ); Tue, 1 Nov 2022 19:05:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231302AbiKAXFd (ORCPT ); Tue, 1 Nov 2022 19:05:33 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C7CC76272; Tue, 1 Nov 2022 16:05:32 -0700 (PDT) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 158FF4EEC; Wed, 2 Nov 2022 00:05:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202205; t=1667343932; bh=onPrRQdppdHaN8PzCdalvAsxdBD2D0jz8MicPGoWdmg=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=b3f5rcxdg4kwk2OpjLmmaULacqRKIiOV+GgAzhWHDBgeP8fZAfFvHOPLVY0o3hKm4 1kzDthvJizDM7i18SrvXXH2K2OKI0rGYLmr+dip1ZAN6xt5u7JPdKYtrcRDoTJBE6I qrBLM56gLlrsSpPq3b6u102ILInzxjn4T7PxLoGwGq9Z5GBkYr/tueochFiBPJ5Qt9 +CN1IkRl2pQqS6L65dR4xGPNiIPuaolZH+lU7HZoaDJygZ0KrB8K2SkDa6gDRtlkv/ yS18wibSQA/ukpkgrCjm+k83uElbZ7a9J4UYCP373njzX3G2uoNIX1zBgz9bnMW4RO P76rXCprUZzp7seAoqR7XzegmTK+NR1OL1apOdck/G+Ujqp/8A0es9I6iQyEGgPv5x bSRfNFitwjjZTXrSeRBDOV0jqk8n75XLVGYQmJ/m85prleq+tDVGlqkTp4AeVyRPmb GhtEF4fycfBxe9UkmB0tUOHIv/fEWwMREh6ziBV+GEJygAeg3QgLwI3vSlJTRQFw2f FW9unM6wVUcLH1Qw3NLDlQY1mrwIFvpKVPI67zqIspebfIylBjlT+xxh/rUHqT6iiN QqpW359gPHsS6zt2oVAme+KQIc77JbJfoFXgf9CO95mpr3Xx1R5uu+GdJSXDisdBJS szhVq3s734GqqkkzyKxI6p1U= Date: Wed, 2 Nov 2022 00:05:30 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= Cc: Jonathan Corbet , Federico Vaga , Alex Shi , Yanteng Si , Hu Haowen , Thomas Bogendoerfer , Greg Kroah-Hartman , Jiri Slaby , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-mips@vger.kernel.org Subject: [PATCH v2 07/15] MIPS: IP27: clean out sn/nmi.h Message-ID: <534e0e7e4f2b0cc1cb35d5024192473635ed1b94.1667330271.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org The only user is arch/mips/sgi-ip27/ip27-nmi.c; this file was imported wholesale in 2.3.99pre9-1, and received only whitespace updates since then. NMI_MAGIC isn't a magic number; it's unclear if it's actually used by the firmware in some capacity or if it's a holdover from copying the SGI code, but in the former case it's API and in the latter it's dead cruft. Lack of QEMU support makes this unvalidatable without the hardware, so leave it in. Signed-off-by: Ahelenia Ziemiańska --- Documentation/process/magic-number.rst | 1 - .../it_IT/process/magic-number.rst | 1 - .../zh_CN/process/magic-number.rst | 1 - .../zh_TW/process/magic-number.rst | 1 - arch/mips/include/asm/sn/nmi.h | 60 ------------------- 5 files changed, 64 deletions(-) diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst index 62a3a2113e7c..7dada7abc733 100644 --- a/Documentation/process/magic-number.rst +++ b/Documentation/process/magic-number.rst @@ -76,5 +76,4 @@ KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/incl CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` -NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Documentation/translations/it_IT/process/magic-number.rst index b20a54ee6fb2..f9634a04d349 100644 --- a/Documentation/translations/it_IT/process/magic-number.rst +++ b/Documentation/translations/it_IT/process/magic-number.rst @@ -82,5 +82,4 @@ KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/incl CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` -NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Documentation/translations/zh_CN/process/magic-number.rst index e7781ab923f7..966b9e6b1a46 100644 --- a/Documentation/translations/zh_CN/process/magic-number.rst +++ b/Documentation/translations/zh_CN/process/magic-number.rst @@ -65,5 +65,4 @@ KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/incl CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` -NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h`` ===================== ================ ======================== ========================================== diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Documentation/translations/zh_TW/process/magic-number.rst index 5cc0bfa97d9d..f3e87a6b3a01 100644 --- a/Documentation/translations/zh_TW/process/magic-number.rst +++ b/Documentation/translations/zh_TW/process/magic-number.rst @@ -68,5 +68,4 @@ KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/incl CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` -NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h`` ===================== ================ ======================== ========================================== diff --git a/arch/mips/include/asm/sn/nmi.h b/arch/mips/include/asm/sn/nmi.h index 12ac210f12a1..0bd9458fc804 100644 --- a/arch/mips/include/asm/sn/nmi.h +++ b/arch/mips/include/asm/sn/nmi.h @@ -10,8 +10,6 @@ #ifndef __ASM_SN_NMI_H #define __ASM_SN_NMI_H -#include - /* * The launch data structure resides at a fixed place in each node's memory * and is used to communicate between the master processor and the slave @@ -29,14 +27,6 @@ */ #define NMI_MAGIC 0x48414d4d455201 -#define NMI_SIZEOF 0x40 - -#define NMI_OFF_MAGIC 0x00 /* Struct offsets for assembly */ -#define NMI_OFF_FLAGS 0x08 -#define NMI_OFF_CALL 0x10 -#define NMI_OFF_CALLC 0x18 -#define NMI_OFF_CALLPARM 0x20 -#define NMI_OFF_GMASTER 0x28 /* * The NMI routine is called only if the complement address is @@ -48,8 +38,6 @@ * */ -#ifndef __ASSEMBLY__ - typedef struct nmi_s { volatile unsigned long magic; /* Magic number */ volatile unsigned long flags; /* Combination of flags above */ @@ -59,14 +47,10 @@ typedef struct nmi_s { volatile unsigned long gmaster; /* Flag true only on global master*/ } nmi_t; -#endif /* !__ASSEMBLY__ */ - /* Following definitions are needed both in the prom & the kernel * to identify the format of the nmi cpu register save area in the * low memory on each node. */ -#ifndef __ASSEMBLY__ - struct reg_struct { unsigned long gpr[32]; unsigned long sr; @@ -78,48 +62,4 @@ struct reg_struct { unsigned long nmi_sr; }; -#endif /* !__ASSEMBLY__ */ - -/* These are the assembly language offsets into the reg_struct structure */ - -#define R0_OFF 0x0 -#define R1_OFF 0x8 -#define R2_OFF 0x10 -#define R3_OFF 0x18 -#define R4_OFF 0x20 -#define R5_OFF 0x28 -#define R6_OFF 0x30 -#define R7_OFF 0x38 -#define R8_OFF 0x40 -#define R9_OFF 0x48 -#define R10_OFF 0x50 -#define R11_OFF 0x58 -#define R12_OFF 0x60 -#define R13_OFF 0x68 -#define R14_OFF 0x70 -#define R15_OFF 0x78 -#define R16_OFF 0x80 -#define R17_OFF 0x88 -#define R18_OFF 0x90 -#define R19_OFF 0x98 -#define R20_OFF 0xa0 -#define R21_OFF 0xa8 -#define R22_OFF 0xb0 -#define R23_OFF 0xb8 -#define R24_OFF 0xc0 -#define R25_OFF 0xc8 -#define R26_OFF 0xd0 -#define R27_OFF 0xd8 -#define R28_OFF 0xe0 -#define R29_OFF 0xe8 -#define R30_OFF 0xf0 -#define R31_OFF 0xf8 -#define SR_OFF 0x100 -#define CAUSE_OFF 0x108 -#define EPC_OFF 0x110 -#define BADVA_OFF 0x118 -#define ERROR_EPC_OFF 0x120 -#define CACHE_ERR_OFF 0x128 -#define NMISR_OFF 0x130 - #endif /* __ASM_SN_NMI_H */ From patchwork Tue Nov 1 23:05:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?0L3QsNCx?= X-Patchwork-Id: 13027607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 191C7C4332F for ; Tue, 1 Nov 2022 23:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231388AbiKAXFr (ORCPT ); Tue, 1 Nov 2022 19:05:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbiKAXFi (ORCPT ); Tue, 1 Nov 2022 19:05:38 -0400 Received: from tarta.nabijaczleweli.xyz (unknown [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 30D3117411; Tue, 1 Nov 2022 16:05:37 -0700 (PDT) Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 782E45196; Wed, 2 Nov 2022 00:05:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202205; t=1667343936; bh=O4KPNylQ43Tq0Q+WVMGVMq6UXo84JvS+hpJnQ0AYxcs=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=Y0XPIdnB5KT0bAAutzRKGAbR4kutjWShMT1woG1DXMfHvaZ8ct/NohSb4838sVmKw h2xm+WI5KDDK/pAA3eyXr0GVJGC/lKVZL81WMfL2qiQSde+A/cEXyPLiA30TRAd+yT TY8qiHW+zZCYQHK9TMrpYLD+GeEFUmToWouR2uuJkks2PJJKXdamOYriwqmNRqjQeQ AVFvTMVYadzf8EVbuFadj4XiyTUyTi2ysn73WBmigvkK9EMQoomQhghkfjElol9Kts fS4+gPR8WvZdWr6CJlm8U88GwmKT3o5d1oB5xm9Ff3avt+quT8ljge4E5QWi0o5Oyi dE2C/s39oIefSAJ5bwQt/fQO7siO4OAMUJmnScEYAMkBLKV91+KPKFQmGRstTUVwq2 Uym9bkCOMkilvccfJ/pJQVAJawDoaJgk/th3qPG1O262v8akLKwsxL+ONvDuPXcI2S VfAokIgImDyLLsk+CLH0rT2UqDG+5dbO9jrTUtodNh8U4KZ6syKYfh6DqYdbG0K/Br wFAY+irRiijfeAAI9K2istGCp1ZDMQGTanHoMo1WmdlE8OHAPNepoY+jJ8LxV3qsUv k8s9u0/j6gLTHRziQyI2Cv8jsmQXUqKmEl0yVrsp2n1a/HHcsqgzWtIlKAj6t+fXtM fYSB/8s6hdaST1WsW4a/FW0o= Date: Wed, 2 Nov 2022 00:05:35 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= Cc: Jonathan Corbet , Federico Vaga , Alex Shi , Yanteng Si , Hu Haowen , Thomas Bogendoerfer , Greg Kroah-Hartman , Jiri Slaby , Bagas Sanjaya , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-mips@vger.kernel.org Subject: [PATCH v2 08/15] MIPS: IP27: remove KV_MAGIC Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org It appeared in the original import of SGI code in 2.4.0-test3pre8 and has never been used anywhere. Reviewed-by: Bagas Sanjaya Signed-off-by: Ahelenia Ziemiańska --- Documentation/process/magic-number.rst | 1 - Documentation/translations/it_IT/process/magic-number.rst | 1 - Documentation/translations/zh_CN/process/magic-number.rst | 1 - Documentation/translations/zh_TW/process/magic-number.rst | 1 - arch/mips/include/asm/sn/klkernvars.h | 8 ++------ arch/mips/sgi-ip27/ip27-klnuma.c | 1 - 6 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Documentation/process/magic-number.rst b/Documentation/process/magic-number.rst index 7dada7abc733..d8ffbc21872e 100644 --- a/Documentation/process/magic-number.rst +++ b/Documentation/process/magic-number.rst @@ -72,7 +72,6 @@ APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kerne FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` -KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` diff --git a/Documentation/translations/it_IT/process/magic-number.rst b/Documentation/translations/it_IT/process/magic-number.rst index f9634a04d349..0e59704aa617 100644 --- a/Documentation/translations/it_IT/process/magic-number.rst +++ b/Documentation/translations/it_IT/process/magic-number.rst @@ -78,7 +78,6 @@ APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kerne FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` -KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` diff --git a/Documentation/translations/zh_CN/process/magic-number.rst b/Documentation/translations/zh_CN/process/magic-number.rst index 966b9e6b1a46..17a73661ef17 100644 --- a/Documentation/translations/zh_CN/process/magic-number.rst +++ b/Documentation/translations/zh_CN/process/magic-number.rst @@ -61,7 +61,6 @@ APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kerne FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` -KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` diff --git a/Documentation/translations/zh_TW/process/magic-number.rst b/Documentation/translations/zh_TW/process/magic-number.rst index f3e87a6b3a01..9d44d49b93bf 100644 --- a/Documentation/translations/zh_TW/process/magic-number.rst +++ b/Documentation/translations/zh_TW/process/magic-number.rst @@ -64,7 +64,6 @@ APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kerne FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` -KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` diff --git a/arch/mips/include/asm/sn/klkernvars.h b/arch/mips/include/asm/sn/klkernvars.h index ea6b21795163..93d5eb873255 100644 --- a/arch/mips/include/asm/sn/klkernvars.h +++ b/arch/mips/include/asm/sn/klkernvars.h @@ -6,18 +6,14 @@ #ifndef __ASM_SN_KLKERNVARS_H #define __ASM_SN_KLKERNVARS_H -#define KV_MAGIC_OFFSET 0x0 -#define KV_RO_NASID_OFFSET 0x4 -#define KV_RW_NASID_OFFSET 0x6 - -#define KV_MAGIC 0x5f4b565f +#define KV_RO_NASID_OFFSET 0x0 +#define KV_RW_NASID_OFFSET 0x2 #ifndef __ASSEMBLY__ #include typedef struct kern_vars_s { - int kv_magic; nasid_t kv_ro_nasid; nasid_t kv_rw_nasid; unsigned long kv_ro_baseaddr; diff --git a/arch/mips/sgi-ip27/ip27-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c index abd7a84df7dd..82bb7ac20ef8 100644 --- a/arch/mips/sgi-ip27/ip27-klnuma.c +++ b/arch/mips/sgi-ip27/ip27-klnuma.c @@ -61,7 +61,6 @@ static __init void set_ktext_source(nasid_t client_nasid, nasid_t server_nasid) KERN_VARS_ADDR(client_nasid) = (unsigned long)kvp; - kvp->kv_magic = KV_MAGIC; kvp->kv_ro_nasid = server_nasid; kvp->kv_rw_nasid = master_nasid; kvp->kv_ro_baseaddr = NODE_CAC_BASE(server_nasid);