)]}'
{
  "commit": "ffe8018c3424892c9590048fc36caa6c3e0c8a76",
  "tree": "072f02441ee317679a7029be4a1905a610de683e",
  "parents": [
    "6ae64e428f74e7bacab898ef9665dda719ea6fde"
  ],
  "author": {
    "name": "Hendrik Brueckner",
    "email": "brueckner@linux.vnet.ibm.com",
    "time": "Fri Sep 17 15:24:11 2010 -0700"
  },
  "committer": {
    "name": "Michal Marek",
    "email": "mmarek@suse.cz",
    "time": "Wed Sep 29 16:28:59 2010 +0200"
  },
  "message": "initramfs: fix initramfs size calculation\n\nThe size of a built-in initramfs is calculated in init/initramfs.c by\n\"__initramfs_end - __initramfs_start\".  Those symbols are defined in the\nlinker script include/asm-generic/vmlinux.lds.h:\n\n#define INIT_RAM_FS                                                     \\\n        . \u003d ALIGN(PAGE_SIZE);                                           \\\n        VMLINUX_SYMBOL(__initramfs_start) \u003d .;                          \\\n        *(.init.ramfs)                                                  \\\n        VMLINUX_SYMBOL(__initramfs_end) \u003d .;\n\nIf the initramfs file has an odd number of bytes, the \"__initramfs_end\"\nsymbol points to an odd address, for example, the symbols in the\nSystem.map might look like:\n\n    0000000000572000 T __initramfs_start\n    00000000005bcd05 T __initramfs_end\t  \u003c-- odd address\n\nAt least on s390 this causes a problem:\n\nCertain s390 instructions, especially instructions for loading addresses\n(larl) or branch addresses must be on even addresses.  The compiler loads\nthe symbol addresses with the \"larl\" instruction.  This instruction sets\nthe last bit to 0 and, therefore, for odd size files, the calculated size\nis one byte less than it should be:\n\n    0000000000540a9c \u003cpopulate_rootfs\u003e:\n      540a9c:     eb cf f0 78 00 24       stmg    %r12,%r15,120(%r15),\n      540aa2:     c0 10 00 01 8a af       larl    %r1,572000 \u003c__initramfs_start\u003e\n      540aa8:     c0 c0 00 03 e1 2e       larl    %r12,5bcd04 \u003cinitramfs_end\u003e\n                                                  (Instead of  5bcd05)\n      ...\n      540abe:     1b c1                   sr      %r12,%r1\n\nTo fix the problem, this patch introduces the global variable\n__initramfs_size, which is calculated in the \"usr/initramfs_data.S\" file.\nThe populate_rootfs() function can then use the start marker of the\n.init.ramfs section and the value of __initramfs_size for loading the\ninitramfs.  Because the start marker and size is sufficient, the\n__initramfs_end symbol is no longer needed and is removed.\n\nSigned-off-by: Michael Holzheu \u003cholzheu@linux.vnet.ibm.com\u003e\nSigned-off-by: Hendrik Brueckner \u003cbrueckner@linux.vnet.ibm.com\u003e\nReviewed-by: WANG Cong \u003cxiyou.wangcong@gmail.com\u003e\nAcked-by: Michal Marek \u003cmmarek@suse.cz\u003e\nAcked-by: \"H. Peter Anvin\" \u003chpa@zytor.com\u003e\nCc: Heiko Carstens \u003cheiko.carstens@de.ibm.com\u003e\nCc: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Michal Marek \u003cmmarek@suse.cz\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "030a954ed292a59feae0bbf8437f370127b22bd6",
      "old_mode": 33188,
      "old_path": "include/asm-generic/vmlinux.lds.h",
      "new_id": "0c6387d6a6aef1e82826de20523e5947ff2f7c46",
      "new_mode": 33188,
      "new_path": "include/asm-generic/vmlinux.lds.h"
    },
    {
      "type": "modify",
      "old_id": "4b9c20205092e1f7de716633c0d51bd8746e74af",
      "old_mode": 33188,
      "old_path": "init/initramfs.c",
      "new_id": "371c3da64ad30381f6b9ea09d9c5e8469bd72dcc",
      "new_mode": 33188,
      "new_path": "init/initramfs.c"
    },
    {
      "type": "modify",
      "old_id": "49a545fea12019616cd1476cd8fa7c4eb0e5e279",
      "old_mode": 33188,
      "old_path": "usr/initramfs_data.S",
      "new_id": "b9efed5e35cc222f3e7b34d922bbc1b90b29987b",
      "new_mode": 33188,
      "new_path": "usr/initramfs_data.S"
    }
  ]
}
