LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au> To: Hari Bathini <hbathini@linux.vnet.ibm.com>, Tony Luck <tony.luck@intel.com>, Kees Cook <keescook@chromium.org>, Anton Vorontsov <anton@enomsg.org>, lkml <linux-kernel@vger.kernel.org>, linuxppc-dev <linuxppc-dev@ozlabs.org>, Colin Cross <ccross@android.com>, <scottwood@freescale.com> Cc: Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> Subject: Re: [v5,1/4] powerpc/nvram: move generic code for nvram and pstore Date: Mon, 23 Mar 2015 14:11:41 +1100 (AEDT) [thread overview] Message-ID: <20150323031141.5E9B9140142@ozlabs.org> (raw) In-Reply-To: <20150205193604.24669.67159.stgit@localhost.localdomain> On Thu, 2015-05-02 at 19:36:04 UTC, Hari Bathini wrote: > With minor checks, we can move most of the code for nvram > under pseries to a common place to be re-used by other > powerpc platforms like powernv. This patch moves such > common code to arch/powerpc/kernel/nvram_64.c file. > > Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com> > --- > arch/powerpc/include/asm/nvram.h | 50 ++ > arch/powerpc/include/asm/rtas.h | 4 > arch/powerpc/kernel/nvram_64.c | 656 ++++++++++++++++++++++++++++++++ > arch/powerpc/platforms/pseries/nvram.c | 665 -------------------------------- > 4 files changed, 714 insertions(+), 661 deletions(-) > > diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c > index 34f7c9b..42e5c6a 100644 > --- a/arch/powerpc/kernel/nvram_64.c > +++ b/arch/powerpc/kernel/nvram_64.c > @@ -26,6 +26,9 @@ ... > +/* Derived from logfs_compress() */ > +static int nvram_compress(const void *in, void *out, size_t inlen, > + size_t outlen) > +{ > + int err, ret; > + > + ret = -EIO; > + err = zlib_deflateInit2(&stream, COMPR_LEVEL, Z_DEFLATED, WINDOW_BITS, > + MEM_LEVEL, Z_DEFAULT_STRATEGY); > + if (err != Z_OK) > + goto error; This fails the build for ppc64e_defconfig: arch/powerpc/kernel/built-in.o: In function `.oops_to_nvram': nvram_64.c:(.text+0x12148): undefined reference to `.zlib_deflateInit2' nvram_64.c:(.text+0x12178): undefined reference to `.zlib_deflate' nvram_64.c:(.text+0x1218c): undefined reference to `.zlib_deflateEnd' arch/powerpc/kernel/built-in.o: In function `.nvram_init_oops_partition': (.init.text+0x41e0): undefined reference to `.zlib_deflate_workspacesize' make: *** [vmlinux] Error 1 It used to be OK because PSERIES selects ZLIB_DEFLATE. I decided to just force ZLIB_DEFLATE on for PPC64. That will add ~22K to the ppc64e kernel image. Scott, if you guys are bothered by that let me know and we can add some #ifdefs to avoid it. cheers
next prev parent reply other threads:[~2015-03-23 3:11 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-05 19:35 [PATCH v5 0/4] powerpc/pstore: Add pstore support for nvram partitions Hari Bathini 2015-02-05 19:36 ` [PATCH v5 1/4] powerpc/nvram: move generic code for nvram and pstore Hari Bathini 2015-03-23 3:11 ` Michael Ellerman [this message] 2015-02-05 19:36 ` [PATCH v5 2/4] pstore: Add pstore type id for PPC64 opal nvram partition Hari Bathini 2015-02-05 19:36 ` [PATCH v5 3/4] pstore: add pstore support on powernv Hari Bathini 2015-02-05 19:37 ` [PATCH v5 4/4] powerpc: make timestamp related code y2038-safe Hari Bathini 2015-02-05 21:28 ` [PATCH v5 0/4] powerpc/pstore: Add pstore support for nvram partitions Kees Cook
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20150323031141.5E9B9140142@ozlabs.org \ --to=mpe@ellerman.id.au \ --cc=anton@enomsg.org \ --cc=ccross@android.com \ --cc=hbathini@linux.vnet.ibm.com \ --cc=keescook@chromium.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxppc-dev@ozlabs.org \ --cc=mahesh@linux.vnet.ibm.com \ --cc=scottwood@freescale.com \ --cc=tony.luck@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).