From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2CBA7A for ; Wed, 15 Jun 2022 10:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=OTj5z30HkEHTzFiSxL8zrtVzrsYfnlyDuMzdm361bU0=; b=HCUls9LzF3Ps7n0VKUrnzevomJ ia+L7aZ6++crtm+I+wasUYBWPh4AONMp82XIzv46xzbr01uby2v9ZiREiWfuzUzGt3xvdb+xXDpTx Ys5ExBktr3NiVd3FTPKxiQFYFafBmQzU4CmKSgypkau70lUhzVwL4xFYfp13PoBtiK60KPa2492ik EWetzqpBqWUpLY9Rd0yKtpw/HIuYRRbaE11vYU5KnLQVEh6T62LQ0SJ8Saj/n4m0NN/8Rb1trWyy8 ujTRzVQCCrKXBehhcJBgGpLLblOsGcwZPb8tcKk5+Lnp+vGBLVChofkwqzoA6VvFvPZEmEY5SC/7Y XIDLNMTA==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1Q7n-000yG9-2r; Wed, 15 Jun 2022 10:19:47 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E9F553007C6; Wed, 15 Jun 2022 12:19:45 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D38BF201A4F6D; Wed, 15 Jun 2022 12:19:45 +0200 (CEST) Date: Wed, 15 Jun 2022 12:19:45 +0200 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Dave Hansen , Mike Rapoport , David Hildenbrand , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv7 05/14] x86/boot: Add infrastructure required for unaccepted memory support Message-ID: References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <20220614120231.48165-6-kirill.shutemov@linux.intel.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220614120231.48165-6-kirill.shutemov@linux.intel.com> On Tue, Jun 14, 2022 at 03:02:22PM +0300, Kirill A. Shutemov wrote: > Pull functionality from the main kernel headers and lib/ that is > required for unaccepted memory support. > > This is preparatory patch. The users for the functionality will come in > following patches. > > Signed-off-by: Kirill A. Shutemov > --- > arch/x86/boot/bitops.h | 40 ++++++++++++ > arch/x86/boot/compressed/align.h | 14 +++++ > arch/x86/boot/compressed/bitmap.c | 43 +++++++++++++ > arch/x86/boot/compressed/bitmap.h | 49 +++++++++++++++ > arch/x86/boot/compressed/bits.h | 36 +++++++++++ > arch/x86/boot/compressed/compiler.h | 9 +++ > arch/x86/boot/compressed/find.c | 54 ++++++++++++++++ > arch/x86/boot/compressed/find.h | 80 ++++++++++++++++++++++++ > arch/x86/boot/compressed/math.h | 37 +++++++++++ > arch/x86/boot/compressed/minmax.h | 61 ++++++++++++++++++ > arch/x86/boot/compressed/pgtable_types.h | 25 ++++++++ That's quite a lot of duplicated code; is there really no way so share this?