116a354f9SWolfgang Denk /* 216a354f9SWolfgang Denk * Adapted from Linux v2.6.36 kernel: arch/powerpc/kernel/asm-offsets.c 316a354f9SWolfgang Denk * 416a354f9SWolfgang Denk * This program is used to generate definitions needed by 516a354f9SWolfgang Denk * assembly language modules. 616a354f9SWolfgang Denk * 716a354f9SWolfgang Denk * We use the technique used in the OSF Mach kernel code: 816a354f9SWolfgang Denk * generate asm statements containing #defines, 916a354f9SWolfgang Denk * compile this file to assembler, and then extract the 1016a354f9SWolfgang Denk * #defines from the assembly-language output. 1116a354f9SWolfgang Denk * 1216a354f9SWolfgang Denk * This program is free software; you can redistribute it and/or 1316a354f9SWolfgang Denk * modify it under the terms of the GNU General Public License 1416a354f9SWolfgang Denk * as published by the Free Software Foundation; either version 1516a354f9SWolfgang Denk * 2 of the License, or (at your option) any later version. 1616a354f9SWolfgang Denk */ 1716a354f9SWolfgang Denk 1816a354f9SWolfgang Denk #include <common.h> 1916a354f9SWolfgang Denk 2016a354f9SWolfgang Denk #include <linux/kbuild.h> 2116a354f9SWolfgang Denk 2216a354f9SWolfgang Denk int main(void) 2316a354f9SWolfgang Denk { 2425ddd1fbSWolfgang Denk /* Round up to make sure size gives nice stack alignment */ 2525ddd1fbSWolfgang Denk DEFINE(GENERATED_GBL_DATA_SIZE, 2625ddd1fbSWolfgang Denk (sizeof(struct global_data)+15) & ~15); 2725ddd1fbSWolfgang Denk 28*89c95f0cSMike Frysinger DEFINE(GENERATED_BD_INFO_SIZE, 29*89c95f0cSMike Frysinger (sizeof(struct bd_info)+15) & ~15); 30*89c95f0cSMike Frysinger 3116a354f9SWolfgang Denk return 0; 3216a354f9SWolfgang Denk } 33