[PATCH v3 1/3] powerpc/nvram: move generic code for nvram and pstore

Hari Bathini hbathini at linux.vnet.ibm.com
Thu Jan 15 05:05:28 AEDT 2015


On 01/14/2015 10:01 AM, Michael Ellerman wrote:
> On Wed, 2014-12-24 at 17:28 +0530, 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.
> As I said in my reply to the previous version:
>
>      ... you need to keep in mind that it is very common for us to build kernels
>      with both POWERNV=y and PSERIES=y.
>      
>      So you need to make sure you're only using CONFIG_PPC_PSERIES to protect things
>      that are optional on pseries. Not things that we *shouldn't* be doing on
>      powernv.

we could as well do away with the PPC_PSERIES flag in a couple of places in
arch/powerpc/kernel/nvram_64.c, but doing that will unnecessarily add
few extra variables for !PPC_PSERIES case.

> Please explain in your commit message how you have dealt with that.
>

Sure. Will update the changelog

> Also, you broke the build for every config that doesn't have
> CONFIG_PPC_PSERIES, all 95 of them. This is pasemi_defconfig for example:

My bad!clobbering_unread_rtas_event should have been static inline
while defining under !PPC_PSERIES

Thanks
Hari

>        LD      arch/powerpc/mm/built-in.o
>      arch/powerpc/mm/init_64.o: In function `clobbering_unread_rtas_event':
>      init_64.c:(.opd+0x48): multiple definition of `clobbering_unread_rtas_event'
>      arch/powerpc/mm/mem.o:mem.c:(.opd+0x90): first defined here
>      arch/powerpc/mm/init_64.o: In function `.clobbering_unread_rtas_event':
>      init_64.c:(.text+0x80): multiple definition of `.clobbering_unread_rtas_event'
>      arch/powerpc/mm/mem.o:mem.c:(.text+0x2c0): first defined here
>        CC      arch/powerpc/kernel/udbg.o
>      /home/kisskb/slave/src/scripts/Makefile.build:336: recipe for target 'arch/powerpc/mm/built-in.o' failed
>      make[2]: *** [arch/powerpc/mm/built-in.o] Error 1
>      /home/kisskb/slave/src/Makefile:938: recipe for target 'arch/powerpc/mm' failed
>      make[1]: *** [arch/powerpc/mm] Error 2
>      make[1]: *** Waiting for unfinished jobs....
>
>
> cheers
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20150114/2d68ba52/attachment-0001.html>


More information about the Linuxppc-dev mailing list