From patchwork Wed Sep 15 03:52:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 12495405 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1844C43219 for ; Wed, 15 Sep 2021 03:52:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9775960F25 for ; Wed, 15 Sep 2021 03:52:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236375AbhIODxz (ORCPT ); Tue, 14 Sep 2021 23:53:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236361AbhIODxw (ORCPT ); Tue, 14 Sep 2021 23:53:52 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EC7EC061574; Tue, 14 Sep 2021 20:52:34 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id k12-20020a056830150c00b0051abe7f680bso1796904otp.1; Tue, 14 Sep 2021 20:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aSjFc8iMNGiFbg7CQVDwoW1UzNaNt3hOiMgdB3yaK6Q=; b=avFYgPC7uaqq4BQUqTkrdfHqJOlz0Pvdl1zxUeSN961ECarn+UhUThOo+h8V6dp6Xm QTFpftfBJLDOqb8FviFk9y4kf92iTH45DoWBmeS02OKmmxWKEYROpsgPMmgOYmB53rND JFo70jqrQAIVZe2+M4oqVVUQ36Co96fZdV1yG2iMIJIz7uydiQASPbq7QzORALwhcZ4y yzCPf1IxUFITfqyoQFzxeyvV7tCQk9ZFa5uBTpXlYJEAshRcy1UUZvs1ykHaXNGZG0pV X0IY7Oj9CLSa9Gyq/A7pDZkCLBM6euB8D4FE4LKOyWHvX/N1p52re2oFsGk7PuIc/mqQ dGkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=aSjFc8iMNGiFbg7CQVDwoW1UzNaNt3hOiMgdB3yaK6Q=; b=VRM/VAxz1t9HwB2KXTMHETXf19831ZvcY95MTFmyg18xv8QeH5z6oP/qwT4nsqx7a3 tXksWAaEfJB74AtCfCPlJRxCHkqqMYJvl7u10I+I/ia426KXXUCR8wB9q+tn0bwaLwML X1aURwNiy/dKzWBcbCfS3R0v92cU/OKUvVLX2jz0oAwfsW1SuWb0PBafq4TapJ4JcDJW I86svVd471M/pz0ivMH/Xe6BGrH4RjmRClayUU/GnfgSBNVAlMLCfL4/yuDuFsc5ZuUZ 4D3kcAZU6yVVsAEiAvsZI50SpP28nAqac0icvmr366eke3+nepItj5zrvfWCbMhGOig6 4hPw== X-Gm-Message-State: AOAM530xcyGGYcmMJng2byN4OUOhp5gUqmZ0fKidtRXoeUkDwoCMorw4 ie1kULApeQCA0EqX/fucerQ= X-Google-Smtp-Source: ABdhPJw0v47/LJ893OiE+UK6aswRsKGBkLU0SMU74HXJBIT9m0EsHDxb2wdGsIGhNCTWQFkPKDN35Q== X-Received: by 2002:a9d:6a4b:: with SMTP id h11mr17799987otn.5.1631677953527; Tue, 14 Sep 2021 20:52:33 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id n19sm3018134otl.63.2021.09.14.20.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 20:52:33 -0700 (PDT) Sender: Guenter Roeck From: Guenter Roeck To: Linus Torvalds Cc: Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E . J . Bottomley" , Helge Deller , "David S . Miller" , Jakub Kicinski , linux-alpha@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, linux-sparse@vger.kernel.org, Guenter Roeck Subject: [PATCH v2 1/4] compiler.h: Introduce absolute_pointer macro Date: Tue, 14 Sep 2021 20:52:24 -0700 Message-Id: <20210915035227.630204-2-linux@roeck-us.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210915035227.630204-1-linux@roeck-us.net> References: <20210915035227.630204-1-linux@roeck-us.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org absolute_pointer() disassociates a pointer from its originating symbol type and context. Use it to prevent compiler warnings/errors such as drivers/net/ethernet/i825xx/82596.c: In function 'i82596_probe': ./arch/m68k/include/asm/string.h:72:25: error: '__builtin_memcpy' reading 6 bytes from a region of size 0 [-Werror=stringop-overread] Such warnings may be reported by gcc 11.x for string and memory operations on fixed addresses. Suggested-by: Linus Torvalds Signed-off-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven --- v2: No change include/linux/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/compiler.h b/include/linux/compiler.h index b67261a1e3e9..3d5af56337bd 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -188,6 +188,8 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, (typeof(ptr)) (__ptr + (off)); }) #endif +#define absolute_pointer(val) RELOC_HIDE((void *)(val), 0) + #ifndef OPTIMIZER_HIDE_VAR /* Make the optimizer believe the variable can be manipulated arbitrarily. */ #define OPTIMIZER_HIDE_VAR(var) \ From patchwork Wed Sep 15 03:52:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 12495407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA3F9C433EF for ; Wed, 15 Sep 2021 03:52:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C34C160F25 for ; Wed, 15 Sep 2021 03:52:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236388AbhIODx7 (ORCPT ); Tue, 14 Sep 2021 23:53:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236366AbhIODxy (ORCPT ); Tue, 14 Sep 2021 23:53:54 -0400 Received: from mail-oo1-xc36.google.com (mail-oo1-xc36.google.com [IPv6:2607:f8b0:4864:20::c36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CDC0C061766; Tue, 14 Sep 2021 20:52:36 -0700 (PDT) Received: by mail-oo1-xc36.google.com with SMTP id b5-20020a4ac285000000b0029038344c3dso436344ooq.8; Tue, 14 Sep 2021 20:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YbkO6eX3svmIKG5IOf3KbQnfzJzo05Zk/s9XsuhsdgM=; b=jkECE0ZRStw6Q+C2y91NLFDDGbMCo24+eUfO5W8Zf2UooRooEgR6+ccD826ws8BQOT egJP6pkgfrD8D/D6WBg4ybOgNN97BuF+ALm8IV7syJCNG23dtJrUQudCvZ2eBpar56cd eXOODyByiVqpceuqOrBtJivz6GOuicpHqM1jNQItDPt0BTo3c1gp+4LrFetDoRfKSbLp AZ5bmv7IwRLgfFKMSGwzJY4qpA3DTZ9o9t2d5Rm6WZI9XngbNVIHyBNwpuBO+ZWFWj9N 1ZAu1KhTyBj+FCIZTl/sex87MzTpSA33dMlts9CowFJlanAOw1xGk1UY0jtyPWRXC59T rqZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=YbkO6eX3svmIKG5IOf3KbQnfzJzo05Zk/s9XsuhsdgM=; b=ds9yFT0Mx5b6BX+99r36QhjxmNWxzdgKfcJCp8lYZuQMWfJkzvq8Bz0Nbce9D8r6Aj JoCqa1Bl1YDrqB+gTKIJK6vt5nZGSu1UUAfn5e8iinK5lK6wa0uQXXV8P+k9B52B8KBd XN1+oSKbAJrdW1YREvpzBFGsBikQokeSAY9TIjSM4MRpg00s1ixH4hyf6EksDksfRjWz /dyXzCB9VURzNIGfrpW+1+/Hov8qY30mGLtijtyTDYPIr5KWpR10y2++rpeRJMZvD3Mu kxW7d4SBHF8PiXRFTjqtOx4xaFEGvYXzt2Wgqw7ZkodI/wyGoiV1ovHOnOLBf6t31MU0 2wsw== X-Gm-Message-State: AOAM533+icDGokGalj494KTIjfFhhbkOSGxYPRxDGkK3zwiLxtiBmZGt DZ2aI0FAZYgKG2/WjMYitVg= X-Google-Smtp-Source: ABdhPJz2YaJRzesVNAbWeshh6RZ6+fKrBG3TZLysCiV5rwm0LZkxT7peixep+VGV0LcI9nsEKF8ejQ== X-Received: by 2002:a4a:e60e:: with SMTP id f14mr16906786oot.84.1631677955492; Tue, 14 Sep 2021 20:52:35 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id w12sm3107794oor.23.2021.09.14.20.52.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 20:52:34 -0700 (PDT) Sender: Guenter Roeck From: Guenter Roeck To: Linus Torvalds Cc: Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E . J . Bottomley" , Helge Deller , "David S . Miller" , Jakub Kicinski , linux-alpha@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, linux-sparse@vger.kernel.org, Guenter Roeck Subject: [PATCH v2 2/4] net: i825xx: Use absolute_pointer for memcpy from fixed memory location Date: Tue, 14 Sep 2021 20:52:25 -0700 Message-Id: <20210915035227.630204-3-linux@roeck-us.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210915035227.630204-1-linux@roeck-us.net> References: <20210915035227.630204-1-linux@roeck-us.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org gcc 11.x reports the following compiler warning/error. drivers/net/ethernet/i825xx/82596.c: In function 'i82596_probe': ./arch/m68k/include/asm/string.h:72:25: error: '__builtin_memcpy' reading 6 bytes from a region of size 0 [-Werror=stringop-overread] Use absolute_pointer() to work around the problem. Cc: Geert Uytterhoeven Signed-off-by: Guenter Roeck Reviewed-by: Geert Uytterhoeven --- v2: No change drivers/net/ethernet/i825xx/82596.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/i825xx/82596.c b/drivers/net/ethernet/i825xx/82596.c index b8a40146b895..b482f6f633bd 100644 --- a/drivers/net/ethernet/i825xx/82596.c +++ b/drivers/net/ethernet/i825xx/82596.c @@ -1144,7 +1144,7 @@ static struct net_device * __init i82596_probe(void) err = -ENODEV; goto out; } - memcpy(eth_addr, (void *) 0xfffc1f2c, ETH_ALEN); /* YUCK! Get addr from NOVRAM */ + memcpy(eth_addr, absolute_pointer(0xfffc1f2c), ETH_ALEN); /* YUCK! Get addr from NOVRAM */ dev->base_addr = MVME_I596_BASE; dev->irq = (unsigned) MVME16x_IRQ_I596; goto found; From patchwork Wed Sep 15 03:52:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 12495409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA067C4332F for ; Wed, 15 Sep 2021 03:52:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B63E960724 for ; Wed, 15 Sep 2021 03:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236366AbhIODx7 (ORCPT ); Tue, 14 Sep 2021 23:53:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236406AbhIODx4 (ORCPT ); Tue, 14 Sep 2021 23:53:56 -0400 Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02CCEC061768; Tue, 14 Sep 2021 20:52:38 -0700 (PDT) Received: by mail-oo1-xc32.google.com with SMTP id l17-20020a4ae391000000b00294ad0b1f52so428843oov.10; Tue, 14 Sep 2021 20:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3aaPF5vSGERQCaEoUNmmtyNjkH4NB7gnK3IgOPR3RPc=; b=eSchhtH2NEH2+tJRmJu694dKY96qWoqIr+byFRhjZ0JtBGo6K0a51DfHqbpC8U70n8 J21fy+wOMHTVOZw3AL5RIXBVjhOP94A8qWIeozYRduDnrTClsTbfIOSpclyShMdAct/2 x5yCdIE9hWc0uY7w3OW0zoUQI58Mx8rBue/60ygP6ANECaDrJHeERWSyhAEBH4Yc9QBt 6cfzkfr2u1yCGwKa1NaFh4Rscusxu86BFipQIZrw9WutQSHjGQW2ilaYFmE1BCRQDpLT 5nriXqiLA08Q7iESCzgOw+38MzMlKylsSnk/mFx4hFg43e/inPhlwPQ2ZuEsc39/hNwp dMwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=3aaPF5vSGERQCaEoUNmmtyNjkH4NB7gnK3IgOPR3RPc=; b=vwhwJgXIAqFCKrc51bGOogsTEkGZaPFTo+ihhyue+O3rPblabiy+VGwOHS97mBnOof qgmfVOo0bGui7LKOASGy8pqnRutDrjH0tR7rkbrYGfj+9nW9pfkO/RUXz0veXc5TRkXU 4Gz2bDiEaZBLJ3FXSFBOg8JTnneGgVGp4afBJe6aFzfoDUwbruLRWV2wnitN+bGcUO+j QP8Co8x1f+tkG/F3jL2MXt3cuxDZvmE4uqeid3z/YAA9gEgyREkglJddRJs1xujW9CXo dIXzOJcZNy1kkxK0A51eZv12uIFgzbIZ+nZT2L7olHjDNheK/76cyrq1jN8cqkNT5hW5 WGPA== X-Gm-Message-State: AOAM5307q61crX+GyHJK4U+X7bEZF65HNcHMkcRiU6OeHP/C7fr2kgj+ tY08LGFDQb+qMaPMWTKkBrY= X-Google-Smtp-Source: ABdhPJyG7qgdY0XE0IfoKM/wbq5OhalJGAac/S3NVRZdg3v1upnGGPvwVAJ0n/LGx6dBNKkH0mVTiQ== X-Received: by 2002:a4a:4344:: with SMTP id l4mr4566709ooj.38.1631677957386; Tue, 14 Sep 2021 20:52:37 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id b11sm3031089ooi.0.2021.09.14.20.52.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 20:52:36 -0700 (PDT) Sender: Guenter Roeck From: Guenter Roeck To: Linus Torvalds Cc: Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E . J . Bottomley" , Helge Deller , "David S . Miller" , Jakub Kicinski , linux-alpha@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, linux-sparse@vger.kernel.org, Guenter Roeck Subject: [PATCH v2 3/4] alpha: Move setup.h out of uapi Date: Tue, 14 Sep 2021 20:52:26 -0700 Message-Id: <20210915035227.630204-4-linux@roeck-us.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210915035227.630204-1-linux@roeck-us.net> References: <20210915035227.630204-1-linux@roeck-us.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org Most of the contents of setup.h have no value for userspace applications. The file was probably moved to uapi accidentally. Keep the file in uapi to define the alpha-specific COMMAND_LINE_SIZE. Move all other defines to arch/alpha/include/asm/setup.h. Suggested-by: Linus Torvalds Signed-off-by: Guenter Roeck --- v2: Added patch arch/alpha/include/asm/setup.h | 43 +++++++++++++++++++++++++++++ arch/alpha/include/uapi/asm/setup.h | 42 ++-------------------------- 2 files changed, 46 insertions(+), 39 deletions(-) create mode 100644 arch/alpha/include/asm/setup.h diff --git a/arch/alpha/include/asm/setup.h b/arch/alpha/include/asm/setup.h new file mode 100644 index 000000000000..58fe3f45a235 --- /dev/null +++ b/arch/alpha/include/asm/setup.h @@ -0,0 +1,43 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ALPHA_SETUP_H +#define __ALPHA_SETUP_H + +#include + +/* + * We leave one page for the initial stack page, and one page for + * the initial process structure. Also, the console eats 3 MB for + * the initial bootloader (one of which we can reclaim later). + */ +#define BOOT_PCB 0x20000000 +#define BOOT_ADDR 0x20000000 +/* Remove when official MILO sources have ELF support: */ +#define BOOT_SIZE (16*1024) + +#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS +#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */ +#else +#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */ +#endif + +#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS) +#define SWAPPER_PGD KERNEL_START +#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000) +#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000) +#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000) +#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000) + +#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000) + +/* + * This is setup by the secondary bootstrap loader. Because + * the zero page is zeroed out as soon as the vm system is + * initialized, we need to copy things out into a more permanent + * place. + */ +#define PARAM ZERO_PGE +#define COMMAND_LINE ((char *)(PARAM + 0x0000)) +#define INITRD_START (*(unsigned long *) (PARAM+0x100)) +#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108)) + +#endif diff --git a/arch/alpha/include/uapi/asm/setup.h b/arch/alpha/include/uapi/asm/setup.h index 13b7ee465b0e..f881ea5947cb 100644 --- a/arch/alpha/include/uapi/asm/setup.h +++ b/arch/alpha/include/uapi/asm/setup.h @@ -1,43 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef __ALPHA_SETUP_H -#define __ALPHA_SETUP_H +#ifndef _UAPI__ALPHA_SETUP_H +#define _UAPI__ALPHA_SETUP_H #define COMMAND_LINE_SIZE 256 -/* - * We leave one page for the initial stack page, and one page for - * the initial process structure. Also, the console eats 3 MB for - * the initial bootloader (one of which we can reclaim later). - */ -#define BOOT_PCB 0x20000000 -#define BOOT_ADDR 0x20000000 -/* Remove when official MILO sources have ELF support: */ -#define BOOT_SIZE (16*1024) - -#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS -#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */ -#else -#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */ -#endif - -#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS) -#define SWAPPER_PGD KERNEL_START -#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000) -#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000) -#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000) -#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000) - -#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000) - -/* - * This is setup by the secondary bootstrap loader. Because - * the zero page is zeroed out as soon as the vm system is - * initialized, we need to copy things out into a more permanent - * place. - */ -#define PARAM ZERO_PGE -#define COMMAND_LINE ((char*)(PARAM + 0x0000)) -#define INITRD_START (*(unsigned long *) (PARAM+0x100)) -#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108)) - -#endif +#endif /* _UAPI__ALPHA_SETUP_H */ From patchwork Wed Sep 15 03:52:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 12495411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5C1FC433F5 for ; Wed, 15 Sep 2021 03:53:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C05B760724 for ; Wed, 15 Sep 2021 03:53:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236403AbhIODyU (ORCPT ); Tue, 14 Sep 2021 23:54:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236435AbhIODx6 (ORCPT ); Tue, 14 Sep 2021 23:53:58 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DAD7C061766; Tue, 14 Sep 2021 20:52:40 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id l16-20020a9d6a90000000b0053b71f7dc83so1750928otq.7; Tue, 14 Sep 2021 20:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LJ4f8HmngmERpwG7jIZZPQRjRc0k1LbYpBN6nK8NBIc=; b=LEgWaiRibOmqug5ZHTfRHkoXMuKiJ6jf2lFXyKM5BFmlPas2u3osFBzaEvEqGYmluF bdeb5F9zoHSh9FIkwLNOi7uxo/di6b5B8XaK1+yojDAmnRwkJqTFPivpleBy+oTuPANb N5tlheoijyXkHvQgLHRIfn1dLRz5B7qIgEOOOOdHvhejLR/9HJIhCjK3PN1B20Q+y16j 35mjX7Yk7E6L4CTd4qX4AU9HuPrM9G9Tdk3tOGtJMFqn2jOxUWvfdEjGTu0DV6aRJfI/ F+N/PN778SdT/lrcjXqwLfQ8R09Ba76wHGBB06qmoCqeHxOl08ZnLwAb76zmHlQtPxpJ xXAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LJ4f8HmngmERpwG7jIZZPQRjRc0k1LbYpBN6nK8NBIc=; b=MiyilRJuyzM7vtmMMQPmykxohvsCOZArjc+zoX/sQjLLuYBDJfZYKolQODAkUnylRL GXHjYGU57jqsWmH3O8csg8MsPnUvmvs5feMgyohDVyM6we/yAbIb52VJWBntYpR/7lk6 rbUG5GRIDKTJOGdvy9AEGP0yL28fueGOwdgpIhgpXN6Y+/U3sqHuYGsEcH/YKqAnREG1 etARF9Mhbk5NuYTDQtCB0FTWmT8zzXin6Oj1KH1lZF+8DsCoNJS4oLeUJgm8vjaXHrTw gYaTik7X3o/q1lSDr0CzO7ZDbIuAfU5xcm9+pbvks2ykvCzxNKuZA9JZwBCoF5tWwZsW zJjQ== X-Gm-Message-State: AOAM531CBgBU9DnNFGOEy3Sj2QqQUm+SKTBdkiqlV//hdx5W+bHltRl4 JSuxs2+we8fwV7/qgMLapZK2x/rc9tQ= X-Google-Smtp-Source: ABdhPJxe9e8UK7Sg6myyOGKSATtdvIhjCl3M+NXOvgAnzPQvbCtjJL2f8NojZzRjCkXoju56AhAL7Q== X-Received: by 2002:a9d:d35:: with SMTP id 50mr17575124oti.22.1631677959552; Tue, 14 Sep 2021 20:52:39 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id y16sm3060719otq.1.2021.09.14.20.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 20:52:38 -0700 (PDT) Sender: Guenter Roeck From: Guenter Roeck To: Linus Torvalds Cc: Richard Henderson , Ivan Kokshaysky , Matt Turner , "James E . J . Bottomley" , Helge Deller , "David S . Miller" , Jakub Kicinski , linux-alpha@vger.kernel.org, Geert Uytterhoeven , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, netdev@vger.kernel.org, linux-sparse@vger.kernel.org, Guenter Roeck Subject: [PATCH v2 4/4] alpha: Use absolute_pointer to define COMMAND_LINE Date: Tue, 14 Sep 2021 20:52:27 -0700 Message-Id: <20210915035227.630204-5-linux@roeck-us.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210915035227.630204-1-linux@roeck-us.net> References: <20210915035227.630204-1-linux@roeck-us.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org alpha:allmodconfig fails to build with the following error when using gcc 11.x. arch/alpha/kernel/setup.c: In function 'setup_arch': arch/alpha/kernel/setup.c:493:13: error: 'strcmp' reading 1 or more bytes from a region of size 0 Avoid the problem by declaring COMMAND_LINE as absolute_pointer(). Signed-off-by: Guenter Roeck --- v2: Declare COMMAND_LINE as absolute_pointer instead of using absolute_pointer on the define arch/alpha/include/asm/setup.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/alpha/include/asm/setup.h b/arch/alpha/include/asm/setup.h index 58fe3f45a235..262aab99e391 100644 --- a/arch/alpha/include/asm/setup.h +++ b/arch/alpha/include/asm/setup.h @@ -36,7 +36,7 @@ * place. */ #define PARAM ZERO_PGE -#define COMMAND_LINE ((char *)(PARAM + 0x0000)) +#define COMMAND_LINE ((char *)(absolute_pointer(PARAM + 0x0000))) #define INITRD_START (*(unsigned long *) (PARAM+0x100)) #define INITRD_SIZE (*(unsigned long *) (PARAM+0x108))