~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/arm/kernel/setup.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
 * already provide the required functionality.
309
309
 */
310
310
extern struct proc_info_list *lookup_processor_type(unsigned int);
311
 
extern struct machine_desc *lookup_machine_type(unsigned int);
 
311
 
 
312
static void __init early_print(const char *str, ...)
 
313
{
 
314
        extern void printascii(const char *);
 
315
        char buf[256];
 
316
        va_list ap;
 
317
 
 
318
        va_start(ap, str);
 
319
        vsnprintf(buf, sizeof(buf), str, ap);
 
320
        va_end(ap);
 
321
 
 
322
#ifdef CONFIG_DEBUG_LL
 
323
        printascii(buf);
 
324
#endif
 
325
        printk("%s", buf);
 
326
}
312
327
 
313
328
static void __init feat_v6_fixup(void)
314
329
{
426
441
 
427
442
static struct machine_desc * __init setup_machine(unsigned int nr)
428
443
{
429
 
        struct machine_desc *list;
 
444
        extern struct machine_desc __arch_info_begin[], __arch_info_end[];
 
445
        struct machine_desc *p;
430
446
 
431
447
        /*
432
448
         * locate machine in the list of supported machines.
433
449
         */
434
 
        list = lookup_machine_type(nr);
435
 
        if (!list) {
436
 
                printk("Machine configuration botched (nr %d), unable "
437
 
                       "to continue.\n", nr);
438
 
                while (1);
439
 
        }
440
 
 
441
 
        printk("Machine: %s\n", list->name);
442
 
 
443
 
        return list;
 
450
        for (p = __arch_info_begin; p < __arch_info_end; p++)
 
451
                if (nr == p->nr) {
 
452
                        printk("Machine: %s\n", p->name);
 
453
                        return p;
 
454
                }
 
455
 
 
456
        early_print("\n"
 
457
                "Error: unrecognized/unsupported machine ID (r1 = 0x%08x).\n\n"
 
458
                "Available machine support:\n\nID (hex)\tNAME\n", nr);
 
459
 
 
460
        for (p = __arch_info_begin; p < __arch_info_end; p++)
 
461
                early_print("%08x\t%s\n", p->nr, p->name);
 
462
 
 
463
        early_print("\nPlease check your kernel config and/or bootloader.\n");
 
464
 
 
465
        while (true)
 
466
                /* can't use cpu_relax() here as it may require MMU setup */;
444
467
}
445
468
 
446
 
static int __init arm_add_memory(unsigned long start, unsigned long size)
 
469
static int __init arm_add_memory(phys_addr_t start, unsigned long size)
447
470
{
448
471
        struct membank *bank = &meminfo.bank[meminfo.nr_banks];
449
472
 
450
473
        if (meminfo.nr_banks >= NR_BANKS) {
451
474
                printk(KERN_CRIT "NR_BANKS too low, "
452
 
                        "ignoring memory at %#lx\n", start);
 
475
                        "ignoring memory at 0x%08llx\n", (long long)start);
453
476
                return -EINVAL;
454
477
        }
455
478
 
479
502
static int __init early_mem(char *p)
480
503
{
481
504
        static int usermem __initdata = 0;
482
 
        unsigned long size, start;
 
505
        unsigned long size;
 
506
        phys_addr_t start;
483
507
        char *endp;
484
508
 
485
509
        /*
703
727
        { tag_size(tag_core), ATAG_CORE },
704
728
        { 1, PAGE_SIZE, 0xff },
705
729
        { tag_size(tag_mem32), ATAG_MEM },
706
 
        { MEM_SIZE, PHYS_OFFSET },
 
730
        { MEM_SIZE },
707
731
        { 0, ATAG_NONE }
708
732
};
709
733
 
765
789
static inline void reserve_crashkernel(void) {}
766
790
#endif /* CONFIG_KEXEC */
767
791
 
768
 
/*
769
 
 * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
770
 
 * is_kdump_kernel() to determine if we are booting after a panic. Hence
771
 
 * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
772
 
 */
773
 
 
774
 
#ifdef CONFIG_CRASH_DUMP
775
 
/*
776
 
 * elfcorehdr= specifies the location of elf core header stored by the crashed
777
 
 * kernel. This option will be passed by kexec loader to the capture kernel.
778
 
 */
779
 
static int __init setup_elfcorehdr(char *arg)
780
 
{
781
 
        char *end;
782
 
 
783
 
        if (!arg)
784
 
                return -EINVAL;
785
 
 
786
 
        elfcorehdr_addr = memparse(arg, &end);
787
 
        return end > arg ? 0 : -EINVAL;
788
 
}
789
 
early_param("elfcorehdr", setup_elfcorehdr);
790
 
#endif /* CONFIG_CRASH_DUMP */
791
 
 
792
792
static void __init squash_mem_tags(struct tag *tag)
793
793
{
794
794
        for (; tag->hdr.size; tag = tag_next(tag))
802
802
        struct machine_desc *mdesc;
803
803
        char *from = default_command_line;
804
804
 
 
805
        init_tags.mem.start = PHYS_OFFSET;
 
806
 
805
807
        unwind_init();
806
808
 
807
809
        setup_processor();
814
816
 
815
817
        if (__atags_pointer)
816
818
                tags = phys_to_virt(__atags_pointer);
817
 
        else if (mdesc->boot_params)
818
 
                tags = phys_to_virt(mdesc->boot_params);
 
819
        else if (mdesc->boot_params) {
 
820
#ifdef CONFIG_MMU
 
821
                /*
 
822
                 * We still are executing with a minimal MMU mapping created
 
823
                 * with the presumption that the machine default for this
 
824
                 * is located in the first MB of RAM.  Anything else will
 
825
                 * fault and silently hang the kernel at this point.
 
826
                 */
 
827
                if (mdesc->boot_params < PHYS_OFFSET ||
 
828
                    mdesc->boot_params >= PHYS_OFFSET + SZ_1M) {
 
829
                        printk(KERN_WARNING
 
830
                               "Default boot params at physical 0x%08lx out of reach\n",
 
831
                               mdesc->boot_params);
 
832
                } else
 
833
#endif
 
834
                {
 
835
                        tags = phys_to_virt(mdesc->boot_params);
 
836
                }
 
837
        }
819
838
 
820
839
#if defined(CONFIG_DEPRECATED_PARAM_STRUCT)
821
840
        /*