aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-01 11:17:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-01 11:17:09 -0400
commit3658f3604066d5500ebd73a04084f127dc779441 (patch)
treeaa4a607815914d99374cbee4e2db53c83070da32 /arch/tile
parentff3421dee60928de95b68a13a1b64125b62b10a4 (diff)
parentff7f3efb9abf986f4ecd8793a9593f7ca4d6431a (diff)
Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Pull arch/tile fix from Chris Metcalf: "This change allows newer Tilera boot tools to work correctly with current (and stable) kernels by using the right filename to get the initramfs from the Tilera hypervisor filesystem." * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: tile: expect new initramfs name from hypervisor file system
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/kernel/setup.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/tile/kernel/setup.c b/arch/tile/kernel/setup.c
index d1e15f7b59c6..7a5aa1a7864e 100644
--- a/arch/tile/kernel/setup.c
+++ b/arch/tile/kernel/setup.c
@@ -1004,15 +1004,8 @@ void __cpuinit setup_cpu(int boot)
1004 1004
1005#ifdef CONFIG_BLK_DEV_INITRD 1005#ifdef CONFIG_BLK_DEV_INITRD
1006 1006
1007/*
1008 * Note that the kernel can potentially support other compression
1009 * techniques than gz, though we don't do so by default. If we ever
1010 * decide to do so we can either look for other filename extensions,
1011 * or just allow a file with this name to be compressed with an
1012 * arbitrary compressor (somewhat counterintuitively).
1013 */
1014static int __initdata set_initramfs_file; 1007static int __initdata set_initramfs_file;
1015static char __initdata initramfs_file[128] = "initramfs.cpio.gz"; 1008static char __initdata initramfs_file[128] = "initramfs";
1016 1009
1017static int __init setup_initramfs_file(char *str) 1010static int __init setup_initramfs_file(char *str)
1018{ 1011{
@@ -1026,9 +1019,9 @@ static int __init setup_initramfs_file(char *str)
1026early_param("initramfs_file", setup_initramfs_file); 1019early_param("initramfs_file", setup_initramfs_file);
1027 1020
1028/* 1021/*
1029 * We look for an "initramfs.cpio.gz" file in the hvfs. 1022 * We look for a file called "initramfs" in the hvfs. If there is one, we
1030 * If there is one, we allocate some memory for it and it will be 1023 * allocate some memory for it and it will be unpacked to the initramfs.
1031 * unpacked to the initramfs. 1024 * If it's compressed, the initd code will uncompress it first.
1032 */ 1025 */
1033static void __init load_hv_initrd(void) 1026static void __init load_hv_initrd(void)
1034{ 1027{
@@ -1038,10 +1031,16 @@ static void __init load_hv_initrd(void)
1038 1031
1039 fd = hv_fs_findfile((HV_VirtAddr) initramfs_file); 1032 fd = hv_fs_findfile((HV_VirtAddr) initramfs_file);
1040 if (fd == HV_ENOENT) { 1033 if (fd == HV_ENOENT) {
1041 if (set_initramfs_file) 1034 if (set_initramfs_file) {
1042 pr_warning("No such hvfs initramfs file '%s'\n", 1035 pr_warning("No such hvfs initramfs file '%s'\n",
1043 initramfs_file); 1036 initramfs_file);
1044 return; 1037 return;
1038 } else {
1039 /* Try old backwards-compatible name. */
1040 fd = hv_fs_findfile((HV_VirtAddr)"initramfs.cpio.gz");
1041 if (fd == HV_ENOENT)
1042 return;
1043 }
1045 } 1044 }
1046 BUG_ON(fd < 0); 1045 BUG_ON(fd < 0);
1047 stat = hv_fs_fstat(fd); 1046 stat = hv_fs_fstat(fd);