Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1943835imn; Mon, 1 Aug 2022 05:55:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR76de8uzDx2xYRMB+1fto05uQft7bJR1UbpfxJxCrnM1SDQdWqX3oCZ81id8HwPY746rhvm X-Received: by 2002:a17:90a:c402:b0:1f2:ca71:93a5 with SMTP id i2-20020a17090ac40200b001f2ca7193a5mr18775980pjt.34.1659358551529; Mon, 01 Aug 2022 05:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659358551; cv=none; d=google.com; s=arc-20160816; b=w2k08l81zbe4pjv08J4DIz6RwoNaVSaJyS8QdFlbZxsMzavP0jsbijPka/8A1XlVON ZxnhOHP8zWQ8bY79dsKz21k7xjdI6xBVTxmSgIfvgxZUzbjayuIY4rjz1MmNLuDpwQ0V wfISxSEu5zCqZedSIakQwPcAFUcHzswtiQifcXuYti4Bnm82XFxy7YkLIB8G2w1mBevK 7SZdRXsRD7g3MjvGQy7RUBdLpxdgtGFRB8e2hC/SFXvZe+ZrzxViHUGAl7t/9GnPnjsW U7tUOvnyya0vW57wQJIcfSwKhbV1QJQ77N0opE3KOB1d/0er4pjJ+1TB1S+ta4vfriRL WJBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2vlbWqCCDrzQc3Nj38jr5+8lGob+5M8kFsF3xmXskfk=; b=qyS2DNmGmY0ax9kZ3wLu6QGe2wxkEn105kxUZjcZHHbhJfJAIS/5VGZTSdFpCux0se l5ixPs3/tYLlAfO5jq6SVdzxTG9K1WQfSaueY3YwkZRavcNXSSR0GncYJ8U+eX9JDrmr xPe3ZUSlTIGWT4rNyFrOclKD4+Mf9AF4KuQOiM/WWVQjW1NhUEItQBlv8vFcYb2lvIZI MY3fh29/M5ePwLROEm9sZsw0nU6/kW2AqGm19QyjEqCffUK9AtQU00npaw8G40a4FTls BEweo5LbTeg4ye9tntCiUohoPRFv8j5/tUaV96RBTlvZDwWIiwFKuXqVzB5EmcTcLPG7 frpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c+VOQW+S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l185-20020a6391c2000000b0041bf8ec0525si4457057pge.434.2022.08.01.05.55.36; Mon, 01 Aug 2022 05:55:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c+VOQW+S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231714AbiHAMa5 (ORCPT + 99 others); Mon, 1 Aug 2022 08:30:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232008AbiHAMam (ORCPT ); Mon, 1 Aug 2022 08:30:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28F3895C0D for ; Mon, 1 Aug 2022 05:09:54 -0700 (PDT) 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 8F5F3601CD for ; Mon, 1 Aug 2022 12:09:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC42EC433D6 for ; Mon, 1 Aug 2022 12:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659355793; bh=Dj1WIaCLQ5ggZ5YYu7kWg3EE1ARgkRRqTx0wUE79N1Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=c+VOQW+SUaPWZGfEtTnRKM9wkL7ZL5NmiF2/xp8QvARdIFIZA7xwhjCd9KsNpnlEj glohiSMODaiuT6YFBP0kBCMI91LXKRzivrvXau/VHLn8Da5Z0sZDaLJM2uZ3IGx9qE zvnkh1t//1KWbMJJNR86u7OBTD8eDZcB3ykxbBJQMeGBTX7xUxZQR3qIZMXHMlXOTx LmGPLDG67Mmv9DS5j9Sp9MmxixLjWXf3lXIe6ccFUe/MVy+JF93yJ5bucIVvY+1kPL o4cgqpzQWljJQFPmDCoc9xN+dfuKgoN4+qwd134qr3fZjmtGq6uTRwXRnuzy28gbsx WqnonsX1TDiug== Received: by mail-vs1-f48.google.com with SMTP id 129so10962831vsq.8 for ; Mon, 01 Aug 2022 05:09:52 -0700 (PDT) X-Gm-Message-State: AJIora/mr3vPBqSxOiBdXO6ibrKUd3Rj8ob8l5apbVuPPPKsv9ywHVwv 9H7Yac5RnO++L9OTtR7d7UqcqYXLTVhI4zTgn0s= X-Received: by 2002:a05:6102:dd4:b0:358:62b5:20a6 with SMTP id e20-20020a0561020dd400b0035862b520a6mr5613984vst.84.1659355791817; Mon, 01 Aug 2022 05:09:51 -0700 (PDT) MIME-Version: 1.0 References: <32a74a218c76611f897fd1df1ad0059068621133.camel@xry111.site> <0179679b736aea7258981dec2d83107cce74dfc1.camel@xry111.site> <6b5d2188f93ed72b67a4bbb7116113f833fe1ee5.camel@xry111.site> <7cad6e78014168a8906e130e1cf3809077d2bda7.camel@xry111.site> <1d0783b87bda3e454a111862fcc5b5faffcb16b0.camel@xry111.site> <00eede4b1380888a500f74b1e818bb25a550632b.camel@xry111.site> <7512ae16-b171-d072-674f-a6b9a5e764d6@loongson.cn> <10751c9af5d45fea741e0bbed6c818ddb9db3ac3.camel@xry111.site> <7b1f9813-85fc-acfd-8e24-7e01469ded3a@loongson.cn> In-Reply-To: From: Huacai Chen Date: Mon, 1 Aug 2022 20:09:39 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 0/4] LoongArch: Support new relocation types To: Xi Ruoyao Cc: Youling Tang , Jinyang He , loongarch@lists.linux.dev, LKML , WANG Xuerui , Lulu Cheng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Ruoyao, On Mon, Aug 1, 2022 at 7:40 PM Xi Ruoyao wrote: > > On Mon, 2022-08-01 at 19:28 +0800, Youling Tang wrote: > > > > Actually, I really hope kernel image is in the XKVRANGE, rather > > > than being in XKPRANGE. So that we can limit kernel and modules > > > be in 4GB range. I think it will make all work normally. :-( > > > > > > > Assuming that the kernel and modules are limited to 4G, the external > > symbols will be accessed through pcrel32, which means that there is no > > need to pass the GOT table entry and there is no need for got support > > We'll still need to modify GCC to use PC-rel for accessing an object in > another TU (by default, or an option to control), instead of GOT. Or > just add support to GOT relocations here. But anyway it will be much > easier as we won't need to handle per-CPU variables specially. All tlb-mapped kernel may be supported in future, but no now. Because there are a ton of problems. :) Huacai > -- > Xi Ruoyao > School of Aerospace Science and Technology, Xidian University