Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4228642pxb; Mon, 8 Feb 2021 10:54:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJy/tAxNbBLz3FRvwSVSHurCrKgMr/6JHfV4UHjoWUpx/09E6wONHHFu07QDS82EM3xdQsa2 X-Received: by 2002:a17:906:eddd:: with SMTP id sb29mr17852013ejb.383.1612810467132; Mon, 08 Feb 2021 10:54:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612810467; cv=none; d=google.com; s=arc-20160816; b=IPL6x3p1+siHWFw/pSQSOW6cPskoGytksnRwQSeahbHIJQ4MF1c9+ge8wsQdrueh4g uGD6IQNQ39QkdYSBJGwMYcmafuIKckC+2e7aku0hEQzx++W2IzO3sSICsWxsigqJwt1d wsplKMcxnWPPtB9TTJ4YPsQxgRoKpuD5GrZqQAIfvYpr+HDqJPJnN5Zlbon09F3NQSTv oaeCD8mnSoJIPqXsJdQwbwiIAD4guI44GM9V7q4oxDJauud9fIIpbzpkf4f3Vc5qXLVe Ty5sGRJNs/tdxLfP0PjpQ26kVAXjBw5fdQtHysGckdAjS8El45r0pJgg32I6KlYChUwY MTEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=OhND9siz+swKCXWzyAE6qDu5KqCHMTNARMp8eDDmPq8=; b=prI4BHRCOr2+U8utHv09qPbI41ilZrtyl1If1GRcA5pvXAtd6DNDcWfe4dztsmFx0y dwI8Ka1Gas/X4YTKj4jAxdWXqXKXAFtXjfwuz2/nUQLHWwY4ZggDcHmRl5OlZWd+iCR2 wDiX7emVFt6M+eYO16QeLHxUW5EuDNm+AHonQqr6NQ7lenNvFd3hf7eMuhqbOjgGR7aq trM7IxbxuipqvENoBablFwmrJ1dlejGfnBN4LGrGLnuZ6ydBaoB+U8WFDMcqWVacBYyy XydjhVtaiEQh737KQX1Cxs6rnOd9OmS0t8wRu0fIUPryvRgP57eGD7p46i1GEBBf18V9 ZfPg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w6si12176349ejq.394.2021.02.08.10.54.02; Mon, 08 Feb 2021 10:54:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235938AbhBHSxI (ORCPT + 99 others); Mon, 8 Feb 2021 13:53:08 -0500 Received: from angie.orcam.me.uk ([157.25.102.26]:47302 "EHLO angie.orcam.me.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234832AbhBHRDz (ORCPT ); Mon, 8 Feb 2021 12:03:55 -0500 Received: by angie.orcam.me.uk (Postfix, from userid 500) id EBC189200BC; Mon, 8 Feb 2021 18:03:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id E89559200B3; Mon, 8 Feb 2021 18:03:08 +0100 (CET) Date: Mon, 8 Feb 2021 18:03:08 +0100 (CET) From: "Maciej W. Rozycki" To: Arnd Bergmann cc: Thomas Bogendoerfer , Arnd Bergmann , kernel test robot , Jiaxun Yang , Paul Cercueil , Paul Burton , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] MIPS: make kgdb depend on FPU support In-Reply-To: <20210122110307.934543-2-arnd@kernel.org> Message-ID: References: <20210122110307.934543-1-arnd@kernel.org> <20210122110307.934543-2-arnd@kernel.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Jan 2021, Arnd Bergmann wrote: > From: Arnd Bergmann > > kgdb fails to build when the FPU support is disabled: > > arch/mips/kernel/kgdb.c: In function 'dbg_set_reg': > arch/mips/kernel/kgdb.c:147:35: error: 'struct thread_struct' has no member named 'fpu' > 147 | memcpy((void *)¤t->thread.fpu.fcr31, mem, > | ^ > arch/mips/kernel/kgdb.c:155:34: error: 'struct thread_struct' has no member named 'fpu' > 155 | memcpy((void *)¤t->thread.fpu.fpr[fp_reg], mem, > > This is only relevant for CONFIG_EXPERT=y, so disallowing it > in Kconfig is an easier workaround than fixing it properly. Wrapping the relevant parts of this file into #ifdef MIPS_FP_SUPPORT would be as easy though and would qualify as a proper fix given that we have no XML description support for the MIPS target (so we need to supply the inexistent registers in the protocol; or maybe we can return NULL in `dbg_get_reg' to get them padded out in the RSP packet, I haven't checked if generic KGDB code supports this feature). Maciej