Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Jul 2008 00:25:46 +0000 (17:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Jul 2008 00:25:46 +0000 (17:25 -0700)
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (72 commits)
  Revert "x86/PCI: ACPI based PCI gap calculation"
  PCI: remove unnecessary volatile in PCIe hotplug struct controller
  x86/PCI: ACPI based PCI gap calculation
  PCI: include linux/pm_wakeup.h for device_set_wakeup_capable
  PCI PM: Fix pci_prepare_to_sleep
  x86/PCI: Fix PCI config space for domains > 0
  Fix acpi_pm_device_sleep_wake() by providing a stub for CONFIG_PM_SLEEP=n
  PCI: Simplify PCI device PM code
  PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep
  PCI ACPI: Rework PCI handling of wake-up
  ACPI: Introduce new device wakeup flag 'prepared'
  ACPI: Introduce acpi_device_sleep_wake function
  PCI: rework pci_set_power_state function to call platform first
  PCI: Introduce platform_pci_power_manageable function
  ACPI: Introduce acpi_bus_power_manageable function
  PCI: make pci_name use dev_name
  PCI: handle pci_name() being const
  PCI: add stub for pci_set_consistent_dma_mask()
  PCI: remove unused arch pcibios_update_resource() functions
  PCI: fix pci_setup_device()'s sprinting into a const buffer
  ...

Fixed up conflicts in various files (arch/x86/kernel/setup_64.c,
arch/x86/pci/irq.c, arch/x86/pci/pci.h, drivers/acpi/sleep/main.c,
drivers/pci/pci.c, drivers/pci/pci.h, include/acpi/acpi_bus.h) from x86
and ACPI updates manually.

24 files changed:
1  2 
Documentation/kernel-parameters.txt
MAINTAINERS
arch/x86/kernel/acpi/sleep.c
arch/x86/kernel/apm_32.c
arch/x86/kernel/early-quirks.c
arch/x86/kernel/setup.c
arch/x86/pci/common.c
arch/x86/pci/irq.c
arch/x86/pci/pci.h
drivers/acpi/Kconfig
drivers/acpi/Makefile
drivers/acpi/bus.c
drivers/acpi/glue.c
drivers/acpi/scan.c
drivers/acpi/sleep/main.c
drivers/base/power/trace.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/intel-iommu.c
drivers/pci/pci-driver.c
drivers/pci/pci.h
drivers/pci/quirks.c
include/asm-generic/vmlinux.lds.h
include/linux/acpi.h
include/linux/pci.h

Simple merge
diff --cc MAINTAINERS
index 2b9212f90446f288ab1d5f9bf7b1067946790626,02a85ab7387d632e3f9aed6f45c820b63dd8b25b..93fd6b2efeee80c4948e0f33f02d8081a26c637c
@@@ -1159,14 -1148,9 +1159,14 @@@ COMPACTPCI HOTPLUG GENERIC DRIVE
  P:    Scott Murray
  M:    scottm@somanetworks.com
  M:    scott@spiteful.org
- L:    pcihpd-discuss@lists.sourceforge.net
+ L:    linux-pci@vger.kernel.org
  S:    Supported
  
 +COMPAL LAPTOP SUPPORT
 +P:    Cezary Jackiewicz
 +M:    cezary.jackiewicz@gmail.com
 +S:    Maintained
 +
  COMPUTONE INTELLIPORT MULTIPORT CARD
  P:    Michael H. Warfield
  M:    mhw@wittsend.com
Simple merge
Simple merge
Simple merge
index 36c540d4ac4b6164dbd02d6b23951ea1315f134f,6f80b852a1961a6b496bc2404c5194769557d97a..531b55b8e81a1de1827eac5691d5f8aef1d8d10c
@@@ -580,310 -82,58 +580,315 @@@ early_param("elfcorehdr", setup_elfcore
  #endif
  
  /*
 - * Great future plan:
 - * Declare PDA itself and support (irqstack,tss,pgd) as per cpu data.
 - * Always point %gs to its beginning
 + * Determine if we were loaded by an EFI loader.  If so, then we have also been
 + * passed the efi memmap, systab, etc., so we should use these data structures
 + * for initialization.  Note, the efi init code path is determined by the
 + * global efi_enabled. This allows the same kernel image to be used on existing
 + * systems (with a traditional BIOS) as well as on EFI systems.
 + */
 +/*
 + * setup_arch - architecture-specific boot-time initializations
 + *
 + * Note: On x86_64, fixmaps are ready for use even before this is called.
   */
 -void __init setup_per_cpu_areas(void)
 +
 +void __init setup_arch(char **cmdline_p)
  {
 -      int i, highest_cpu = 0;
 -      unsigned long size;
 +#ifdef CONFIG_X86_32
 +      memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
 +      visws_early_detect();
 +      pre_setup_arch_hook();
 +      early_cpu_init();
 +#else
 +      printk(KERN_INFO "Command line: %s\n", boot_command_line);
 +#endif
  
 -#ifdef CONFIG_HOTPLUG_CPU
 -      prefill_possible_map();
 +      early_ioremap_init();
 +
 +      ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);
 +      screen_info = boot_params.screen_info;
 +      edid_info = boot_params.edid_info;
 +#ifdef CONFIG_X86_32
 +      apm_info.bios = boot_params.apm_bios_info;
 +      ist_info = boot_params.ist_info;
 +      if (boot_params.sys_desc_table.length != 0) {
 +              set_mca_bus(boot_params.sys_desc_table.table[3] & 0x2);
 +              machine_id = boot_params.sys_desc_table.table[0];
 +              machine_submodel_id = boot_params.sys_desc_table.table[1];
 +              BIOS_revision = boot_params.sys_desc_table.table[2];
 +      }
 +#endif
 +      saved_video_mode = boot_params.hdr.vid_mode;
 +      bootloader_type = boot_params.hdr.type_of_loader;
 +
 +#ifdef CONFIG_BLK_DEV_RAM
 +      rd_image_start = boot_params.hdr.ram_size & RAMDISK_IMAGE_START_MASK;
 +      rd_prompt = ((boot_params.hdr.ram_size & RAMDISK_PROMPT_FLAG) != 0);
 +      rd_doload = ((boot_params.hdr.ram_size & RAMDISK_LOAD_FLAG) != 0);
 +#endif
 +#ifdef CONFIG_EFI
 +      if (!strncmp((char *)&boot_params.efi_info.efi_loader_signature,
 +#ifdef CONFIG_X86_32
 +                   "EL32",
 +#else
 +                   "EL64",
 +#endif
 +       4)) {
 +              efi_enabled = 1;
 +              efi_reserve_early();
 +      }
  #endif
  
 -      /* Copy section for each CPU (we discard the original) */
 -      size = PERCPU_ENOUGH_ROOM;
 -      printk(KERN_INFO "PERCPU: Allocating %lu bytes of per cpu data\n",
 -                        size);
 +      ARCH_SETUP
  
 -      for_each_possible_cpu(i) {
 -              char *ptr;
 -#ifndef CONFIG_NEED_MULTIPLE_NODES
 -              ptr = alloc_bootmem_pages(size);
 +      setup_memory_map();
 +      parse_setup_data();
 +      /* update the e820_saved too */
 +      e820_reserve_setup_data();
 +
 +      copy_edd();
 +
 +      if (!boot_params.hdr.root_flags)
 +              root_mountflags &= ~MS_RDONLY;
 +      init_mm.start_code = (unsigned long) _text;
 +      init_mm.end_code = (unsigned long) _etext;
 +      init_mm.end_data = (unsigned long) _edata;
 +#ifdef CONFIG_X86_32
 +      init_mm.brk = init_pg_tables_end + PAGE_OFFSET;
  #else
 -              int node = early_cpu_to_node(i);
 -              if (!node_online(node) || !NODE_DATA(node)) {
 -                      ptr = alloc_bootmem_pages(size);
 -                      printk(KERN_INFO
 -                             "cpu %d has no node or node-local memory\n", i);
 -              }
 -              else
 -                      ptr = alloc_bootmem_pages_node(NODE_DATA(node), size);
 +      init_mm.brk = (unsigned long) &_end;
  #endif
 -              if (!ptr)
 -                      panic("Cannot allocate cpu data for CPU %d\n", i);
 +
 +      code_resource.start = virt_to_phys(_text);
 +      code_resource.end = virt_to_phys(_etext)-1;
 +      data_resource.start = virt_to_phys(_etext);
 +      data_resource.end = virt_to_phys(_edata)-1;
 +      bss_resource.start = virt_to_phys(&__bss_start);
 +      bss_resource.end = virt_to_phys(&__bss_stop)-1;
 +
  #ifdef CONFIG_X86_64
 -              cpu_pda(i)->data_offset = ptr - __per_cpu_start;
 +      early_cpu_init();
 +#endif
 +      strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
 +      *cmdline_p = command_line;
 +
 +      parse_early_param();
 +
 +      /* after early param, so could get panic from serial */
 +      reserve_early_setup_data();
 +
 +      if (acpi_mps_check()) {
 +#ifdef CONFIG_X86_LOCAL_APIC
 +              disable_apic = 1;
 +#endif
 +              clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
 +      }
 +
++#ifdef CONFIG_PCI
++      if (pci_early_dump_regs)
++              early_dump_pci_devices();
++#endif
++
 +      finish_e820_parsing();
 +
 +#ifdef CONFIG_X86_32
 +      probe_roms();
 +#endif
 +
 +      /* after parse_early_param, so could debug it */
 +      insert_resource(&iomem_resource, &code_resource);
 +      insert_resource(&iomem_resource, &data_resource);
 +      insert_resource(&iomem_resource, &bss_resource);
 +
 +      if (efi_enabled)
 +              efi_init();
 +
 +#ifdef CONFIG_X86_32
 +      if (ppro_with_ram_bug()) {
 +              e820_update_range(0x70000000ULL, 0x40000ULL, E820_RAM,
 +                                E820_RESERVED);
 +              sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
 +              printk(KERN_INFO "fixed physical RAM map:\n");
 +              e820_print_map("bad_ppro");
 +      }
 +#else
 +      early_gart_iommu_check();
 +#endif
 +
 +      /*
 +       * partially used pages are not usable - thus
 +       * we are rounding upwards:
 +       */
 +      max_pfn = e820_end_of_ram_pfn();
 +
 +      /* preallocate 4k for mptable mpc */
 +      early_reserve_e820_mpc_new();
 +      /* update e820 for memory not covered by WB MTRRs */
 +      mtrr_bp_init();
 +      if (mtrr_trim_uncached_memory(max_pfn))
 +              max_pfn = e820_end_of_ram_pfn();
 +
 +#ifdef CONFIG_X86_32
 +      /* max_low_pfn get updated here */
 +      find_low_pfn_range();
  #else
 -              __per_cpu_offset[i] = ptr - __per_cpu_start;
 +      num_physpages = max_pfn;
 +
 +      check_efer();
 +
 +      /* How many end-of-memory variables you have, grandma! */
 +      /* need this before calling reserve_initrd */
 +      if (max_pfn > (1UL<<(32 - PAGE_SHIFT)))
 +              max_low_pfn = e820_end_of_low_ram_pfn();
 +      else
 +              max_low_pfn = max_pfn;
 +
 +      high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1;
  #endif
 -              memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
  
 -              highest_cpu = i;
 +      /* max_pfn_mapped is updated here */
 +      max_low_pfn_mapped = init_memory_mapping(0, max_low_pfn<<PAGE_SHIFT);
 +      max_pfn_mapped = max_low_pfn_mapped;
 +
 +#ifdef CONFIG_X86_64
 +      if (max_pfn > max_low_pfn) {
 +              max_pfn_mapped = init_memory_mapping(1UL<<32,
 +                                                   max_pfn<<PAGE_SHIFT);
 +              /* can we preseve max_low_pfn ?*/
 +              max_low_pfn = max_pfn;
        }
 +#endif
  
 -      nr_cpu_ids = highest_cpu + 1;
 -      printk(KERN_DEBUG "NR_CPUS: %d, nr_cpu_ids: %d\n", NR_CPUS, nr_cpu_ids);
 +      /*
 +       * NOTE: On x86-32, only from this point on, fixmaps are ready for use.
 +       */
  
 -      /* Setup percpu data maps */
 -      setup_per_cpu_maps();
 +#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
 +      if (init_ohci1394_dma_early)
 +              init_ohci1394_dma_on_all_controllers();
 +#endif
  
 -      /* Setup cpumask_of_cpu map */
 -      setup_cpumask_of_cpu();
 -}
 +      reserve_initrd();
 +
 +#ifdef CONFIG_X86_64
 +      vsmp_init();
 +#endif
 +
 +      dmi_scan_machine();
 +
 +      io_delay_init();
 +
 +      /*
 +       * Parse the ACPI tables for possible boot-time SMP configuration.
 +       */
 +      acpi_boot_table_init();
 +
 +#ifdef CONFIG_ACPI_NUMA
 +      /*
 +       * Parse SRAT to discover nodes.
 +       */
 +      acpi_numa_init();
 +#endif
 +
 +      initmem_init(0, max_pfn);
 +
 +#ifdef CONFIG_X86_64
 +      dma32_reserve_bootmem();
 +#endif
 +
 +#ifdef CONFIG_ACPI_SLEEP
 +      /*
 +       * Reserve low memory region for sleep support.
 +       */
 +      acpi_reserve_bootmem();
 +#endif
 +#ifdef CONFIG_X86_FIND_SMP_CONFIG
 +      /*
 +       * Find and reserve possible boot-time SMP configuration:
 +       */
 +      find_smp_config();
 +#endif
 +      reserve_crashkernel();
 +
 +      reserve_ibft_region();
 +
 +#ifdef CONFIG_KVM_CLOCK
 +      kvmclock_init();
 +#endif
 +
 +#if defined(CONFIG_VMI) && defined(CONFIG_X86_32)
 +      /*
 +       * Must be after max_low_pfn is determined, and before kernel
 +       * pagetables are setup.
 +       */
 +      vmi_init();
 +#endif
 +
 +      paging_init();
 +
 +#ifdef CONFIG_X86_64
 +      map_vsyscall();
 +#endif
 +
 +#ifdef CONFIG_X86_GENERICARCH
 +      generic_apic_probe();
 +#endif
 +
 +      early_quirks();
 +
 +      /*
 +       * Read APIC and some other early information from ACPI tables.
 +       */
 +      acpi_boot_init();
 +
 +#if defined(CONFIG_X86_MPPARSE) || defined(CONFIG_X86_VISWS)
 +      /*
 +       * get boot-time SMP configuration:
 +       */
 +      if (smp_found_config)
 +              get_smp_config();
 +#endif
  
 +      prefill_possible_map();
 +#ifdef CONFIG_X86_64
 +      init_cpu_to_node();
 +#endif
 +
 +#ifdef CONFIG_X86_NUMAQ
 +      /*
 +       * need to check online nodes num, call it
 +       * here before time_init/tsc_init
 +       */
 +      numaq_tsc_disable();
 +#endif
 +
 +      init_apic_mappings();
 +      ioapic_init_mappings();
 +
 +#if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) && defined(CONFIG_X86_32)
 +      if (def_to_bigsmp)
 +              printk(KERN_WARNING "More than 8 CPUs detected and "
 +                      "CONFIG_X86_PC cannot handle it.\nUse "
 +                      "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
 +#endif
 +      kvm_guest_init();
 +
 +      e820_reserve_resources();
 +      e820_mark_nosave_regions(max_low_pfn);
 +
 +#ifdef CONFIG_X86_32
 +      request_resource(&iomem_resource, &video_ram_resource);
 +#endif
 +      reserve_standard_io_resources();
 +
 +      e820_setup_gap();
 +
 +#ifdef CONFIG_VT
 +#if defined(CONFIG_VGA_CONSOLE)
 +      if (!efi_enabled || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
 +              conswitchp = &vga_con;
 +#elif defined(CONFIG_DUMMY_CONSOLE)
 +      conswitchp = &dummy_con;
  #endif
 +#endif
 +}
Simple merge
Simple merge
index b2270a55b0cf48ed934913d48a6c297cee38e1c8,291dafec07b703026e500ab07d7b1e9645d217a9..3e25deb821ac9152feb484db2414565c541f18de
@@@ -27,7 -27,7 +27,8 @@@
  #define PCI_CAN_SKIP_ISA_ALIGN        0x8000
  #define PCI_USE__CRS          0x10000
  #define PCI_CHECK_ENABLE_AMD_MMCONF   0x20000
 -#define PCI_NOASSIGN_ROMS     0x40000
 +#define PCI_HAS_IO_ECS                0x40000
++#define PCI_NOASSIGN_ROMS     0x80000
  
  extern unsigned int pci_probe;
  extern unsigned long pirq_table_addr;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index b20409404c7dac724761f2e4df39d228f25b9026,cf108a3c7f59eed5495a2e83d769a76ff2dd39f7..729f6b0a60e9d1655cfa5005236c5bf11fb83d5c
                VMLINUX_SYMBOL(__start_pci_fixups_resume) = .;          \
                *(.pci_fixup_resume)                                    \
                VMLINUX_SYMBOL(__end_pci_fixups_resume) = .;            \
+               VMLINUX_SYMBOL(__start_pci_fixups_resume_early) = .;    \
+               *(.pci_fixup_resume_early)                              \
+               VMLINUX_SYMBOL(__end_pci_fixups_resume_early) = .;      \
+               VMLINUX_SYMBOL(__start_pci_fixups_suspend) = .;         \
+               *(.pci_fixup_suspend)                                   \
+               VMLINUX_SYMBOL(__end_pci_fixups_suspend) = .;           \
        }                                                               \
                                                                        \
 +      /* Built-in firmware blobs */                                   \
 +      .builtin_fw        : AT(ADDR(.builtin_fw) - LOAD_OFFSET) {      \
 +              VMLINUX_SYMBOL(__start_builtin_fw) = .;                 \
 +              *(.builtin_fw)                                          \
 +              VMLINUX_SYMBOL(__end_builtin_fw) = .;                   \
 +      }                                                               \
 +                                                                      \
        /* RapidIO route ops */                                         \
        .rio_route        : AT(ADDR(.rio_route) - LOAD_OFFSET) {        \
                VMLINUX_SYMBOL(__start_rio_route_ops) = .;              \
Simple merge
Simple merge