]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 28 Feb 2010 18:38:45 +0000 (10:38 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 28 Feb 2010 18:38:45 +0000 (10:38 -0800)
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, mm: Unify kernel_physical_mapping_init() API
  x86, mm: Allow highmem user page tables to be disabled at boot time
  x86: Do not reserve brk for DMI if it's not going to be used
  x86: Convert tlbstate_lock to raw_spinlock
  x86: Use the generic page_is_ram()
  x86: Remove BIOS data range from e820
  Move page_is_ram() declaration to mm.h
  Generic page_is_ram: use __weak
  resources: introduce generic page_is_ram()

1  2 
Documentation/kernel-parameters.txt
arch/mips/mm/init.c
arch/x86/mm/ioremap.c
kernel/resource.c

index db611e195ebbcd5fd591ed6ebd5f99388a01949b,67c69ffe7b7fcf1d92ae7bee6a095ebddb1d5172..8c666d80f0e7713b16ff48c18e3d2c71b63058f8
@@@ -199,10 -199,6 +199,10 @@@ and is between 256 and 4096 characters
                        acpi_display_output=video
                        See above.
  
 +      acpi_early_pdc_eval     [HW,ACPI] Evaluate processor _PDC methods
 +                              early. Needed on some platforms to properly
 +                              initialize the EC.
 +
        acpi_irq_balance [HW,ACPI]
                        ACPI will balance active IRQs
                        default in APIC mode
        aic79xx=        [HW,SCSI]
                        See Documentation/scsi/aic79xx.txt.
  
 +      alignment=      [KNL,ARM]
 +                      Allow the default userspace alignment fault handler
 +                      behaviour to be specified.  Bit 0 enables warnings,
 +                      bit 1 enables fixups, and bit 2 sends a segfault.
 +
        amd_iommu=      [HW,X86-84]
                        Pass parameters to the AMD IOMMU driver in the system.
                        Possible values are:
        nomfgpt         [X86-32] Disable Multi-Function General Purpose
                        Timer usage (for AMD Geode machines).
  
 +      nopat           [X86] Disable PAT (page attribute table extension of
 +                      pagetables) support.
 +
        norandmaps      Don't use address space randomization.  Equivalent to
                        echo 0 > /proc/sys/kernel/randomize_va_space
  
                                IRQ routing is enabled.
                noacpi          [X86] Do not use ACPI for IRQ routing
                                or for PCI scanning.
 -              use_crs         [X86] Use _CRS for PCI resource
 -                              allocation.
 +              use_crs         [X86] Use PCI host bridge window information
 +                              from ACPI.  On BIOSes from 2008 or later, this
 +                              is enabled by default.  If you need to use this,
 +                              please report a bug.
 +              nocrs           [X86] Ignore PCI host bridge windows from ACPI.
 +                              If you need to use this, please report a bug.
                routeirq        Do IRQ routing for all PCI devices.
                                This is normally done in pci_enable_device(),
                                so this option is a temporary workaround
                force   Enable ASPM even on devices that claim not to support it.
                        WARNING: Forcing ASPM on may cause system lockups.
  
 +      pcie_pme=       [PCIE,PM] Native PCIe PME signaling options:
 +              off     Do not use native PCIe PME signaling.
 +              force   Use native PCIe PME signaling even if the BIOS refuses
 +                      to allow the kernel to control the relevant PCIe config
 +                      registers.
 +              nomsi   Do not use MSI for native PCIe PME signaling (this makes
 +                      all PCIe root ports use INTx for everything).
 +
        pcmv=           [HW,PCMCIA] BadgePAD 4
  
        pd.             [PARIDE]
                                        medium is write-protected).
                        Example: quirks=0419:aaf5:rl,0421:0433:rc
  
+       userpte=
+                       [X86] Flags controlling user PTE allocations.
+                               nohigh = do not allocate PTE pages in
+                                       HIGHMEM regardless of setting
+                                       of CONFIG_HIGHPTE.
        vdso=           [X86,SH]
                        vdso=2: enable compat VDSO (default with COMPAT_VDSO)
                        vdso=1: enable VDSO (default)
diff --combined arch/mips/mm/init.c
index f34c26439a32057e21139635aee58b11691de46f,dee564aad23a8ae49a380f383ff92d8ee5cadaaf..12539af38a990bff5e271a2ddfadce886fd867d5
@@@ -143,7 -143,7 +143,7 @@@ void *kmap_coherent(struct page *page, 
  #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32)
        entrylo = pte.pte_high;
  #else
 -      entrylo = pte_val(pte) >> 6;
 +      entrylo = pte_to_entrylo(pte_val(pte));
  #endif
  
        ENTER_CRITICAL(flags);
@@@ -298,7 -298,7 +298,7 @@@ void __init fixrange_init(unsigned lon
  }
  
  #ifndef CONFIG_NEED_MULTIPLE_NODES
static int __init page_is_ram(unsigned long pagenr)
int page_is_ram(unsigned long pagenr)
  {
        int i;
  
@@@ -477,7 -477,7 +477,7 @@@ unsigned long pgd_current[NR_CPUS]
   * will officially be retired.
   */
  pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER);
 -#ifdef CONFIG_64BIT
 +#ifndef __PAGETABLE_PMD_FOLDED
  pmd_t invalid_pmd_table[PTRS_PER_PMD] __page_aligned(PMD_ORDER);
  #endif
  pte_t invalid_pte_table[PTRS_PER_PTE] __page_aligned(PTE_ORDER);
diff --combined arch/x86/mm/ioremap.c
index 03c75ffd5c2ad85cbffd05bc00404e0e34b1f1b1,e404ffe302105f3a7a38107fc4d4e23286799594..5eb1ba74a3a933e9c82f18773395a57c0954a3ed
  
  #include "physaddr.h"
  
- int page_is_ram(unsigned long pagenr)
- {
-       resource_size_t addr, end;
-       int i;
-       /*
-        * A special case is the first 4Kb of memory;
-        * This is a BIOS owned area, not kernel ram, but generally
-        * not listed as such in the E820 table.
-        */
-       if (pagenr == 0)
-               return 0;
-       /*
-        * Second special case: Some BIOSen report the PC BIOS
-        * area (640->1Mb) as ram even though it is not.
-        */
-       if (pagenr >= (BIOS_BEGIN >> PAGE_SHIFT) &&
-                   pagenr < (BIOS_END >> PAGE_SHIFT))
-               return 0;
-       for (i = 0; i < e820.nr_map; i++) {
-               /*
-                * Not usable memory:
-                */
-               if (e820.map[i].type != E820_RAM)
-                       continue;
-               addr = (e820.map[i].addr + PAGE_SIZE-1) >> PAGE_SHIFT;
-               end = (e820.map[i].addr + e820.map[i].size) >> PAGE_SHIFT;
-               if ((pagenr >= addr) && (pagenr < end))
-                       return 1;
-       }
-       return 0;
- }
  /*
   * Fix up the linear direct mapping of the kernel to avoid cache attribute
   * conflicts.
@@@ -422,10 -385,6 +385,10 @@@ void __init early_ioremap_init(void
         * The boot-ioremap range spans multiple pmds, for which
         * we are not prepared:
         */
 +#define __FIXADDR_TOP (-PAGE_SIZE)
 +      BUILD_BUG_ON((__fix_to_virt(FIX_BTMAP_BEGIN) >> PMD_SHIFT)
 +                   != (__fix_to_virt(FIX_BTMAP_END) >> PMD_SHIFT));
 +#undef __FIXADDR_TOP
        if (pmd != early_ioremap_pmd(fix_to_virt(FIX_BTMAP_END))) {
                WARN_ON(1);
                printk(KERN_WARNING "pmd %p != %p\n",
diff --combined kernel/resource.c
index 24e9e60c1459350bf5e6df4d2cc64daacedcfbeb,03c897f7935e100276e41ed83e1e3af3f549bbd9..4e9d87fd7bc5609f86d2cd7b96f8fb3889dc63b7
@@@ -188,36 -188,6 +188,36 @@@ static int __release_resource(struct re
        return -EINVAL;
  }
  
 +static void __release_child_resources(struct resource *r)
 +{
 +      struct resource *tmp, *p;
 +      resource_size_t size;
 +
 +      p = r->child;
 +      r->child = NULL;
 +      while (p) {
 +              tmp = p;
 +              p = p->sibling;
 +
 +              tmp->parent = NULL;
 +              tmp->sibling = NULL;
 +              __release_child_resources(tmp);
 +
 +              printk(KERN_DEBUG "release child resource %pR\n", tmp);
 +              /* need to restore size, and keep flags */
 +              size = resource_size(tmp);
 +              tmp->start = 0;
 +              tmp->end = size - 1;
 +      }
 +}
 +
 +void release_child_resources(struct resource *r)
 +{
 +      write_lock(&resource_lock);
 +      __release_child_resources(r);
 +      write_unlock(&resource_lock);
 +}
 +
  /**
   * request_resource - request and reserve an I/O or memory resource
   * @root: root resource descriptor
@@@ -327,16 -297,27 +327,29 @@@ int walk_system_ram_range(unsigned lon
  
  #endif
  
+ static int __is_ram(unsigned long pfn, unsigned long nr_pages, void *arg)
+ {
+       return 1;
+ }
+ /*
+  * This generic page_is_ram() returns true if specified address is
+  * registered as "System RAM" in iomem_resource list.
+  */
+ int __weak page_is_ram(unsigned long pfn)
+ {
+       return walk_system_ram_range(pfn, 1, NULL, __is_ram) == 1;
+ }
  /*
   * Find empty slot in the resource tree given range and alignment.
   */
  static int find_resource(struct resource *root, struct resource *new,
                         resource_size_t size, resource_size_t min,
                         resource_size_t max, resource_size_t align,
 -                       void (*alignf)(void *, struct resource *,
 -                                      resource_size_t, resource_size_t),
 +                       resource_size_t (*alignf)(void *,
 +                                                 const struct resource *,
 +                                                 resource_size_t,
 +                                                 resource_size_t),
                         void *alignf_data)
  {
        struct resource *this = root->child;
                        tmp.end = max;
                tmp.start = ALIGN(tmp.start, align);
                if (alignf)
 -                      alignf(alignf_data, &tmp, size, align);
 +                      tmp.start = alignf(alignf_data, &tmp, size, align);
                if (tmp.start < tmp.end && tmp.end - tmp.start >= size - 1) {
                        new->start = tmp.start;
                        new->end = tmp.start + size - 1;
  int allocate_resource(struct resource *root, struct resource *new,
                      resource_size_t size, resource_size_t min,
                      resource_size_t max, resource_size_t align,
 -                    void (*alignf)(void *, struct resource *,
 -                                   resource_size_t, resource_size_t),
 +                    resource_size_t (*alignf)(void *,
 +                                              const struct resource *,
 +                                              resource_size_t,
 +                                              resource_size_t),
                      void *alignf_data)
  {
        int err;