aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig177
-rw-r--r--init/do_mounts.c86
-rw-r--r--init/do_mounts_md.c2
-rw-r--r--init/do_mounts_rd.c4
-rw-r--r--init/initramfs.c14
-rw-r--r--init/main.c4
-rw-r--r--init/noinitramfs.c6
7 files changed, 191 insertions, 102 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 35518243c4bd..526ec1c7456a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -21,6 +21,13 @@ config CONSTRUCTORS
21 depends on !UML 21 depends on !UML
22 default y 22 default y
23 23
24config HAVE_IRQ_WORK
25 bool
26
27config IRQ_WORK
28 bool
29 depends on HAVE_IRQ_WORK
30
24menu "General setup" 31menu "General setup"
25 32
26config EXPERIMENTAL 33config EXPERIMENTAL
@@ -64,7 +71,7 @@ config BROKEN_ON_SMP
64 71
65config LOCK_KERNEL 72config LOCK_KERNEL
66 bool 73 bool
67 depends on SMP || PREEMPT 74 depends on (SMP || PREEMPT) && BKL
68 default y 75 default y
69 76
70config INIT_ENV_ARG_LIMIT 77config INIT_ENV_ARG_LIMIT
@@ -179,7 +186,7 @@ config KERNEL_LZO
179 depends on HAVE_KERNEL_LZO 186 depends on HAVE_KERNEL_LZO
180 help 187 help
181 Its compression ratio is the poorest among the 4. The kernel 188 Its compression ratio is the poorest among the 4. The kernel
182 size is about about 10% bigger than gzip; however its speed 189 size is about 10% bigger than gzip; however its speed
183 (both compression and decompression) is the fastest. 190 (both compression and decompression) is the fastest.
184 191
185endchoice 192endchoice
@@ -332,6 +339,8 @@ config AUDIT_TREE
332 depends on AUDITSYSCALL 339 depends on AUDITSYSCALL
333 select FSNOTIFY 340 select FSNOTIFY
334 341
342source "kernel/irq/Kconfig"
343
335menu "RCU Subsystem" 344menu "RCU Subsystem"
336 345
337choice 346choice
@@ -562,7 +571,6 @@ if CGROUPS
562 571
563config CGROUP_DEBUG 572config CGROUP_DEBUG
564 bool "Example debug cgroup subsystem" 573 bool "Example debug cgroup subsystem"
565 depends on CGROUPS
566 default n 574 default n
567 help 575 help
568 This option enables a simple cgroup subsystem that 576 This option enables a simple cgroup subsystem that
@@ -573,7 +581,6 @@ config CGROUP_DEBUG
573 581
574config CGROUP_NS 582config CGROUP_NS
575 bool "Namespace cgroup subsystem" 583 bool "Namespace cgroup subsystem"
576 depends on CGROUPS
577 help 584 help
578 Provides a simple namespace cgroup subsystem to 585 Provides a simple namespace cgroup subsystem to
579 provide hierarchical naming of sets of namespaces, 586 provide hierarchical naming of sets of namespaces,
@@ -582,21 +589,18 @@ config CGROUP_NS
582 589
583config CGROUP_FREEZER 590config CGROUP_FREEZER
584 bool "Freezer cgroup subsystem" 591 bool "Freezer cgroup subsystem"
585 depends on CGROUPS
586 help 592 help
587 Provides a way to freeze and unfreeze all tasks in a 593 Provides a way to freeze and unfreeze all tasks in a
588 cgroup. 594 cgroup.
589 595
590config CGROUP_DEVICE 596config CGROUP_DEVICE
591 bool "Device controller for cgroups" 597 bool "Device controller for cgroups"
592 depends on CGROUPS && EXPERIMENTAL
593 help 598 help
594 Provides a cgroup implementing whitelists for devices which 599 Provides a cgroup implementing whitelists for devices which
595 a process in the cgroup can mknod or open. 600 a process in the cgroup can mknod or open.
596 601
597config CPUSETS 602config CPUSETS
598 bool "Cpuset support" 603 bool "Cpuset support"
599 depends on CGROUPS
600 help 604 help
601 This option will let you create and manage CPUSETs which 605 This option will let you create and manage CPUSETs which
602 allow dynamically partitioning a system into sets of CPUs and 606 allow dynamically partitioning a system into sets of CPUs and
@@ -612,7 +616,6 @@ config PROC_PID_CPUSET
612 616
613config CGROUP_CPUACCT 617config CGROUP_CPUACCT
614 bool "Simple CPU accounting cgroup subsystem" 618 bool "Simple CPU accounting cgroup subsystem"
615 depends on CGROUPS
616 help 619 help
617 Provides a simple Resource Controller for monitoring the 620 Provides a simple Resource Controller for monitoring the
618 total CPU consumed by the tasks in a cgroup. 621 total CPU consumed by the tasks in a cgroup.
@@ -622,11 +625,10 @@ config RESOURCE_COUNTERS
622 help 625 help
623 This option enables controller independent resource accounting 626 This option enables controller independent resource accounting
624 infrastructure that works with cgroups. 627 infrastructure that works with cgroups.
625 depends on CGROUPS
626 628
627config CGROUP_MEM_RES_CTLR 629config CGROUP_MEM_RES_CTLR
628 bool "Memory Resource Controller for Control Groups" 630 bool "Memory Resource Controller for Control Groups"
629 depends on CGROUPS && RESOURCE_COUNTERS 631 depends on RESOURCE_COUNTERS
630 select MM_OWNER 632 select MM_OWNER
631 help 633 help
632 Provides a memory resource controller that manages both anonymous 634 Provides a memory resource controller that manages both anonymous
@@ -664,10 +666,23 @@ config CGROUP_MEM_RES_CTLR_SWAP
664 if boot option "noswapaccount" is set, swap will not be accounted. 666 if boot option "noswapaccount" is set, swap will not be accounted.
665 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page 667 Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
666 size is 4096bytes, 512k per 1Gbytes of swap. 668 size is 4096bytes, 512k per 1Gbytes of swap.
669config CGROUP_MEM_RES_CTLR_SWAP_ENABLED
670 bool "Memory Resource Controller Swap Extension enabled by default"
671 depends on CGROUP_MEM_RES_CTLR_SWAP
672 default y
673 help
674 Memory Resource Controller Swap Extension comes with its price in
675 a bigger memory consumption. General purpose distribution kernels
676 which want to enable the feautre but keep it disabled by default
677 and let the user enable it by swapaccount boot command line
678 parameter should have this option unselected.
679 For those who want to have the feature enabled by default should
680 select this option (if, for some reason, they need to disable it
681 then noswapaccount does the trick).
667 682
668menuconfig CGROUP_SCHED 683menuconfig CGROUP_SCHED
669 bool "Group CPU scheduler" 684 bool "Group CPU scheduler"
670 depends on EXPERIMENTAL && CGROUPS 685 depends on EXPERIMENTAL
671 default n 686 default n
672 help 687 help
673 This feature lets CPU scheduler recognize task groups and control CPU 688 This feature lets CPU scheduler recognize task groups and control CPU
@@ -696,7 +711,7 @@ endif #CGROUP_SCHED
696 711
697config BLK_CGROUP 712config BLK_CGROUP
698 tristate "Block IO controller" 713 tristate "Block IO controller"
699 depends on CGROUPS && BLOCK 714 depends on BLOCK
700 default n 715 default n
701 ---help--- 716 ---help---
702 Generic block IO controller cgroup interface. This is the common 717 Generic block IO controller cgroup interface. This is the common
@@ -705,11 +720,14 @@ config BLK_CGROUP
705 720
706 Currently, CFQ IO scheduler uses it to recognize task groups and 721 Currently, CFQ IO scheduler uses it to recognize task groups and
707 control disk bandwidth allocation (proportional time slice allocation) 722 control disk bandwidth allocation (proportional time slice allocation)
708 to such task groups. 723 to such task groups. It is also used by bio throttling logic in
724 block layer to implement upper limit in IO rates on a device.
709 725
710 This option only enables generic Block IO controller infrastructure. 726 This option only enables generic Block IO controller infrastructure.
711 One needs to also enable actual IO controlling logic in CFQ for it 727 One needs to also enable actual IO controlling logic/policy. For
712 to take effect. (CONFIG_CFQ_GROUP_IOSCHED=y). 728 enabling proportional weight division of disk bandwidth in CFQ seti
729 CONFIG_CFQ_GROUP_IOSCHED=y and for enabling throttling policy set
730 CONFIG_BLK_THROTTLE=y.
713 731
714 See Documentation/cgroups/blkio-controller.txt for more information. 732 See Documentation/cgroups/blkio-controller.txt for more information.
715 733
@@ -723,57 +741,7 @@ config DEBUG_BLK_CGROUP
723 741
724endif # CGROUPS 742endif # CGROUPS
725 743
726config MM_OWNER 744menuconfig NAMESPACES
727 bool
728
729config SYSFS_DEPRECATED
730 bool
731
732config SYSFS_DEPRECATED_V2
733 bool "enable deprecated sysfs features to support old userspace tools"
734 depends on SYSFS
735 default n
736 select SYSFS_DEPRECATED
737 help
738 This option switches the layout of sysfs to the deprecated
739 version. Do not use it on recent distributions.
740
741 The current sysfs layout features a unified device tree at
742 /sys/devices/, which is able to express a hierarchy between
743 class devices. If the deprecated option is set to Y, the
744 unified device tree is split into a bus device tree at
745 /sys/devices/ and several individual class device trees at
746 /sys/class/. The class and bus devices will be connected by
747 "<subsystem>:<name>" and the "device" links. The "block"
748 class devices, will not show up in /sys/class/block/. Some
749 subsystems will suppress the creation of some devices which
750 depend on the unified device tree.
751
752 This option is not a pure compatibility option that can
753 be safely enabled on newer distributions. It will change the
754 layout of sysfs to the non-extensible deprecated version,
755 and disable some features, which can not be exported without
756 confusing older userspace tools. Since 2007/2008 all major
757 distributions do not enable this option, and ship no tools which
758 depend on the deprecated layout or this option.
759
760 If you are using a new kernel on an older distribution, or use
761 older userspace tools, you might need to say Y here. Do not say Y,
762 if the original kernel, that came with your distribution, has
763 this option set to N.
764
765config RELAY
766 bool "Kernel->user space relay support (formerly relayfs)"
767 help
768 This option enables support for relay interface support in
769 certain file systems (such as debugfs).
770 It is designed to provide an efficient mechanism for tools and
771 facilities to relay large amounts of data from kernel space to
772 user space.
773
774 If unsure, say N.
775
776config NAMESPACES
777 bool "Namespaces support" if EMBEDDED 745 bool "Namespaces support" if EMBEDDED
778 default !EMBEDDED 746 default !EMBEDDED
779 help 747 help
@@ -782,48 +750,102 @@ config NAMESPACES
782 or same user id or pid may refer to different tasks when used in 750 or same user id or pid may refer to different tasks when used in
783 different namespaces. 751 different namespaces.
784 752
753if NAMESPACES
754
785config UTS_NS 755config UTS_NS
786 bool "UTS namespace" 756 bool "UTS namespace"
787 depends on NAMESPACES 757 default y
788 help 758 help
789 In this namespace tasks see different info provided with the 759 In this namespace tasks see different info provided with the
790 uname() system call 760 uname() system call
791 761
792config IPC_NS 762config IPC_NS
793 bool "IPC namespace" 763 bool "IPC namespace"
794 depends on NAMESPACES && (SYSVIPC || POSIX_MQUEUE) 764 depends on (SYSVIPC || POSIX_MQUEUE)
765 default y
795 help 766 help
796 In this namespace tasks work with IPC ids which correspond to 767 In this namespace tasks work with IPC ids which correspond to
797 different IPC objects in different namespaces. 768 different IPC objects in different namespaces.
798 769
799config USER_NS 770config USER_NS
800 bool "User namespace (EXPERIMENTAL)" 771 bool "User namespace (EXPERIMENTAL)"
801 depends on NAMESPACES && EXPERIMENTAL 772 depends on EXPERIMENTAL
773 default y
802 help 774 help
803 This allows containers, i.e. vservers, to use user namespaces 775 This allows containers, i.e. vservers, to use user namespaces
804 to provide different user info for different servers. 776 to provide different user info for different servers.
805 If unsure, say N. 777 If unsure, say N.
806 778
807config PID_NS 779config PID_NS
808 bool "PID Namespaces (EXPERIMENTAL)" 780 bool "PID Namespaces"
809 default n 781 default y
810 depends on NAMESPACES && EXPERIMENTAL
811 help 782 help
812 Support process id namespaces. This allows having multiple 783 Support process id namespaces. This allows having multiple
813 processes with the same pid as long as they are in different 784 processes with the same pid as long as they are in different
814 pid namespaces. This is a building block of containers. 785 pid namespaces. This is a building block of containers.
815 786
816 Unless you want to work with an experimental feature
817 say N here.
818
819config NET_NS 787config NET_NS
820 bool "Network namespace" 788 bool "Network namespace"
821 default n 789 depends on NET
822 depends on NAMESPACES && EXPERIMENTAL && NET 790 default y
823 help 791 help
824 Allow user space to create what appear to be multiple instances 792 Allow user space to create what appear to be multiple instances
825 of the network stack. 793 of the network stack.
826 794
795endif # NAMESPACES
796
797config MM_OWNER
798 bool
799
800config SYSFS_DEPRECATED
801 bool "enable deprecated sysfs features to support old userspace tools"
802 depends on SYSFS
803 default n
804 help
805 This option adds code that switches the layout of the "block" class
806 devices, to not show up in /sys/class/block/, but only in
807 /sys/block/.
808
809 This switch is only active when the sysfs.deprecated=1 boot option is
810 passed or the SYSFS_DEPRECATED_V2 option is set.
811
812 This option allows new kernels to run on old distributions and tools,
813 which might get confused by /sys/class/block/. Since 2007/2008 all
814 major distributions and tools handle this just fine.
815
816 Recent distributions and userspace tools after 2009/2010 depend on
817 the existence of /sys/class/block/, and will not work with this
818 option enabled.
819
820 Only if you are using a new kernel on an old distribution, you might
821 need to say Y here.
822
823config SYSFS_DEPRECATED_V2
824 bool "enabled deprecated sysfs features by default"
825 default n
826 depends on SYSFS
827 depends on SYSFS_DEPRECATED
828 help
829 Enable deprecated sysfs by default.
830
831 See the CONFIG_SYSFS_DEPRECATED option for more details about this
832 option.
833
834 Only if you are using a new kernel on an old distribution, you might
835 need to say Y here. Even then, odds are you would not need it
836 enabled, you can always pass the boot option if absolutely necessary.
837
838config RELAY
839 bool "Kernel->user space relay support (formerly relayfs)"
840 help
841 This option enables support for relay interface support in
842 certain file systems (such as debugfs).
843 It is designed to provide an efficient mechanism for tools and
844 facilities to relay large amounts of data from kernel space to
845 user space.
846
847 If unsure, say N.
848
827config BLK_DEV_INITRD 849config BLK_DEV_INITRD
828 bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support" 850 bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
829 depends on BROKEN || !FRV 851 depends on BROKEN || !FRV
@@ -1058,6 +1080,7 @@ config PERF_EVENTS
1058 default y if (PROFILING || PERF_COUNTERS) 1080 default y if (PROFILING || PERF_COUNTERS)
1059 depends on HAVE_PERF_EVENTS 1081 depends on HAVE_PERF_EVENTS
1060 select ANON_INODES 1082 select ANON_INODES
1083 select IRQ_WORK
1061 help 1084 help
1062 Enable kernel support for various performance events provided 1085 Enable kernel support for various performance events provided
1063 by software and hardware. 1086 by software and hardware.
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 02e3ca4fc527..830aaec9c7d5 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -58,6 +58,62 @@ static int __init readwrite(char *str)
58__setup("ro", readonly); 58__setup("ro", readonly);
59__setup("rw", readwrite); 59__setup("rw", readwrite);
60 60
61#ifdef CONFIG_BLOCK
62/**
63 * match_dev_by_uuid - callback for finding a partition using its uuid
64 * @dev: device passed in by the caller
65 * @data: opaque pointer to a 36 byte char array with a UUID
66 *
67 * Returns 1 if the device matches, and 0 otherwise.
68 */
69static int match_dev_by_uuid(struct device *dev, void *data)
70{
71 u8 *uuid = data;
72 struct hd_struct *part = dev_to_part(dev);
73
74 if (!part->info)
75 goto no_match;
76
77 if (memcmp(uuid, part->info->uuid, sizeof(part->info->uuid)))
78 goto no_match;
79
80 return 1;
81no_match:
82 return 0;
83}
84
85
86/**
87 * devt_from_partuuid - looks up the dev_t of a partition by its UUID
88 * @uuid: 36 byte char array containing a hex ascii UUID
89 *
90 * The function will return the first partition which contains a matching
91 * UUID value in its partition_meta_info struct. This does not search
92 * by filesystem UUIDs.
93 *
94 * Returns the matching dev_t on success or 0 on failure.
95 */
96static dev_t __init devt_from_partuuid(char *uuid_str)
97{
98 dev_t res = 0;
99 struct device *dev = NULL;
100 u8 uuid[16];
101
102 /* Pack the requested UUID in the expected format. */
103 part_pack_uuid(uuid_str, uuid);
104
105 dev = class_find_device(&block_class, NULL, uuid, &match_dev_by_uuid);
106 if (!dev)
107 goto done;
108
109 res = dev->devt;
110 put_device(dev);
111
112done:
113 return res;
114}
115#endif
116
61/* 117/*
62 * Convert a name into device number. We accept the following variants: 118 * Convert a name into device number. We accept the following variants:
63 * 119 *
@@ -68,6 +124,8 @@ __setup("rw", readwrite);
68 * of partition - device number of disk plus the partition number 124 * of partition - device number of disk plus the partition number
69 * 5) /dev/<disk_name>p<decimal> - same as the above, that form is 125 * 5) /dev/<disk_name>p<decimal> - same as the above, that form is
70 * used when disk name of partitioned disk ends on a digit. 126 * used when disk name of partitioned disk ends on a digit.
127 * 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing the
128 * unique id of a partition if the partition table provides it.
71 * 129 *
72 * If name doesn't have fall into the categories above, we return (0,0). 130 * If name doesn't have fall into the categories above, we return (0,0).
73 * block_class is used to check if something is a disk name. If the disk 131 * block_class is used to check if something is a disk name. If the disk
@@ -82,6 +140,18 @@ dev_t name_to_dev_t(char *name)
82 dev_t res = 0; 140 dev_t res = 0;
83 int part; 141 int part;
84 142
143#ifdef CONFIG_BLOCK
144 if (strncmp(name, "PARTUUID=", 9) == 0) {
145 name += 9;
146 if (strlen(name) != 36)
147 goto fail;
148 res = devt_from_partuuid(name);
149 if (!res)
150 goto fail;
151 goto done;
152 }
153#endif
154
85 if (strncmp(name, "/dev/", 5) != 0) { 155 if (strncmp(name, "/dev/", 5) != 0) {
86 unsigned maj, min; 156 unsigned maj, min;
87 157
@@ -221,7 +291,7 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)
221 if (err) 291 if (err)
222 return err; 292 return err;
223 293
224 sys_chdir("/root"); 294 sys_chdir((const char __user __force *)"/root");
225 ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev; 295 ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev;
226 printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n", 296 printk("VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
227 current->fs->pwd.mnt->mnt_sb->s_type->name, 297 current->fs->pwd.mnt->mnt_sb->s_type->name,
@@ -291,13 +361,13 @@ out:
291#ifdef CONFIG_ROOT_NFS 361#ifdef CONFIG_ROOT_NFS
292static int __init mount_nfs_root(void) 362static int __init mount_nfs_root(void)
293{ 363{
294 void *data = nfs_root_data(); 364 char *root_dev, *root_data;
295 365
296 create_dev("/dev/root", ROOT_DEV); 366 if (nfs_root_data(&root_dev, &root_data) != 0)
297 if (data && 367 return 0;
298 do_mount_root("/dev/root", "nfs", root_mountflags, data) == 0) 368 if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0)
299 return 1; 369 return 0;
300 return 0; 370 return 1;
301} 371}
302#endif 372#endif
303 373
@@ -418,5 +488,5 @@ void __init prepare_namespace(void)
418out: 488out:
419 devtmpfs_mount("dev"); 489 devtmpfs_mount("dev");
420 sys_mount(".", "/", NULL, MS_MOVE, NULL); 490 sys_mount(".", "/", NULL, MS_MOVE, NULL);
421 sys_chroot("."); 491 sys_chroot((const char __user __force *)".");
422} 492}
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c
index 69aebbf8fd2d..32c4799b8c91 100644
--- a/init/do_mounts_md.c
+++ b/init/do_mounts_md.c
@@ -283,7 +283,7 @@ static void __init autodetect_raid(void)
283 283
284 wait_for_device_probe(); 284 wait_for_device_probe();
285 285
286 fd = sys_open("/dev/md0", 0, 0); 286 fd = sys_open((const char __user __force *) "/dev/md0", 0, 0);
287 if (fd >= 0) { 287 if (fd >= 0) {
288 sys_ioctl(fd, RAID_AUTORUN, raid_autopart); 288 sys_ioctl(fd, RAID_AUTORUN, raid_autopart);
289 sys_close(fd); 289 sys_close(fd);
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index bf3ef667bf36..6e1ee6987c78 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -168,7 +168,7 @@ int __init rd_load_image(char *from)
168 char rotator[4] = { '|' , '/' , '-' , '\\' }; 168 char rotator[4] = { '|' , '/' , '-' , '\\' };
169#endif 169#endif
170 170
171 out_fd = sys_open("/dev/ram", O_RDWR, 0); 171 out_fd = sys_open((const char __user __force *) "/dev/ram", O_RDWR, 0);
172 if (out_fd < 0) 172 if (out_fd < 0)
173 goto out; 173 goto out;
174 174
@@ -267,7 +267,7 @@ noclose_input:
267 sys_close(out_fd); 267 sys_close(out_fd);
268out: 268out:
269 kfree(buf); 269 kfree(buf);
270 sys_unlink("/dev/ram"); 270 sys_unlink((const char __user __force *) "/dev/ram");
271 return res; 271 return res;
272} 272}
273 273
diff --git a/init/initramfs.c b/init/initramfs.c
index 4b9c20205092..2531811d42cb 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -483,7 +483,8 @@ static int __init retain_initrd_param(char *str)
483} 483}
484__setup("retain_initrd", retain_initrd_param); 484__setup("retain_initrd", retain_initrd_param);
485 485
486extern char __initramfs_start[], __initramfs_end[]; 486extern char __initramfs_start[];
487extern unsigned long __initramfs_size;
487#include <linux/initrd.h> 488#include <linux/initrd.h>
488#include <linux/kexec.h> 489#include <linux/kexec.h>
489 490
@@ -528,7 +529,7 @@ static void __init clean_rootfs(void)
528 struct linux_dirent64 *dirp; 529 struct linux_dirent64 *dirp;
529 int num; 530 int num;
530 531
531 fd = sys_open("/", O_RDONLY, 0); 532 fd = sys_open((const char __user __force *) "/", O_RDONLY, 0);
532 WARN_ON(fd < 0); 533 WARN_ON(fd < 0);
533 if (fd < 0) 534 if (fd < 0)
534 return; 535 return;
@@ -570,8 +571,7 @@ static void __init clean_rootfs(void)
570 571
571static int __init populate_rootfs(void) 572static int __init populate_rootfs(void)
572{ 573{
573 char *err = unpack_to_rootfs(__initramfs_start, 574 char *err = unpack_to_rootfs(__initramfs_start, __initramfs_size);
574 __initramfs_end - __initramfs_start);
575 if (err) 575 if (err)
576 panic(err); /* Failed to decompress INTERNAL initramfs */ 576 panic(err); /* Failed to decompress INTERNAL initramfs */
577 if (initrd_start) { 577 if (initrd_start) {
@@ -585,12 +585,12 @@ static int __init populate_rootfs(void)
585 return 0; 585 return 0;
586 } else { 586 } else {
587 clean_rootfs(); 587 clean_rootfs();
588 unpack_to_rootfs(__initramfs_start, 588 unpack_to_rootfs(__initramfs_start, __initramfs_size);
589 __initramfs_end - __initramfs_start);
590 } 589 }
591 printk(KERN_INFO "rootfs image is not initramfs (%s)" 590 printk(KERN_INFO "rootfs image is not initramfs (%s)"
592 "; looks like an initrd\n", err); 591 "; looks like an initrd\n", err);
593 fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 0700); 592 fd = sys_open((const char __user __force *) "/initrd.image",
593 O_WRONLY|O_CREAT, 0700);
594 if (fd >= 0) { 594 if (fd >= 0) {
595 sys_write(fd, (char *)initrd_start, 595 sys_write(fd, (char *)initrd_start,
596 initrd_end - initrd_start); 596 initrd_end - initrd_start);
diff --git a/init/main.c b/init/main.c
index 94ab488039aa..8646401f7a0e 100644
--- a/init/main.c
+++ b/init/main.c
@@ -20,7 +20,6 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/ioport.h> 21#include <linux/ioport.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/smp_lock.h>
24#include <linux/initrd.h> 23#include <linux/initrd.h>
25#include <linux/bootmem.h> 24#include <linux/bootmem.h>
26#include <linux/acpi.h> 25#include <linux/acpi.h>
@@ -424,7 +423,6 @@ static void __init setup_command_line(char *command_line)
424static __initdata DECLARE_COMPLETION(kthreadd_done); 423static __initdata DECLARE_COMPLETION(kthreadd_done);
425 424
426static noinline void __init_refok rest_init(void) 425static noinline void __init_refok rest_init(void)
427 __releases(kernel_lock)
428{ 426{
429 int pid; 427 int pid;
430 428
@@ -556,7 +554,6 @@ asmlinkage void __init start_kernel(void)
556 554
557 local_irq_disable(); 555 local_irq_disable();
558 early_boot_irqs_off(); 556 early_boot_irqs_off();
559 early_init_irq_lock_class();
560 557
561/* 558/*
562 * Interrupts are still disabled. Do necessary setups, then 559 * Interrupts are still disabled. Do necessary setups, then
@@ -819,7 +816,6 @@ static void run_init_process(const char *init_filename)
819 * makes it inline to init() and it becomes part of init.text section 816 * makes it inline to init() and it becomes part of init.text section
820 */ 817 */
821static noinline int init_post(void) 818static noinline int init_post(void)
822 __releases(kernel_lock)
823{ 819{
824 /* need to finish all async __init code before freeing the memory */ 820 /* need to finish all async __init code before freeing the memory */
825 async_synchronize_full(); 821 async_synchronize_full();
diff --git a/init/noinitramfs.c b/init/noinitramfs.c
index f4c1a3a1b8c5..267739d85179 100644
--- a/init/noinitramfs.c
+++ b/init/noinitramfs.c
@@ -29,17 +29,17 @@ static int __init default_rootfs(void)
29{ 29{
30 int err; 30 int err;
31 31
32 err = sys_mkdir("/dev", 0755); 32 err = sys_mkdir((const char __user __force *) "/dev", 0755);
33 if (err < 0) 33 if (err < 0)
34 goto out; 34 goto out;
35 35
36 err = sys_mknod((const char __user *) "/dev/console", 36 err = sys_mknod((const char __user __force *) "/dev/console",
37 S_IFCHR | S_IRUSR | S_IWUSR, 37 S_IFCHR | S_IRUSR | S_IWUSR,
38 new_encode_dev(MKDEV(5, 1))); 38 new_encode_dev(MKDEV(5, 1)));
39 if (err < 0) 39 if (err < 0)
40 goto out; 40 goto out;
41 41
42 err = sys_mkdir("/root", 0700); 42 err = sys_mkdir((const char __user __force *) "/root", 0700);
43 if (err < 0) 43 if (err < 0)
44 goto out; 44 goto out;
45 45