1. 13 5月, 2008 1 次提交
  2. 11 5月, 2008 4 次提交
  3. 08 5月, 2008 3 次提交
  4. 07 5月, 2008 1 次提交
    • H
      x86: fix PAE pmd_bad bootup warning · aeed5fce
      Hugh Dickins 提交于
      Fix warning from pmd_bad() at bootup on a HIGHMEM64G HIGHPTE x86_32.
      
      That came from 9fc34113 x86: debug pmd_bad();
      but we understand now that the typecasting was wrong for PAE in the previous
      version: pagetable pages above 4GB looked bad and stopped Arjan from booting.
      
      And revert that cded932b x86: fix pmd_bad
      and pud_bad to support huge pages.  It was the wrong way round: we shouldn't
      weaken every pmd_bad and pud_bad check to let huge pages slip through - in
      part they check that we _don't_ have a huge page where it's not expected.
      
      Put the x86 pmd_bad() and pud_bad() definitions back to what they have long
      been: they can be improved (x86_32 should use PTE_MASK, to stop PAE thinking
      junk in the upper word is good; and x86_64 should follow x86_32's stricter
      comparison, to stop thinking any subset of required bits is good); but that
      should be a later patch.
      
      Fix Hans' good observation that follow_page() will never find pmd_huge()
      because that would have already failed the pmd_bad test: test pmd_huge in
      between the pmd_none and pmd_bad tests.  Tighten x86's pmd_huge() check?
      No, once it's a hugepage entry, it can get quite far from a good pmd: for
      example, PROT_NONE leaves it with only ACCESSED of the KERN_PGTABLE bits.
      
      However... though follow_page() contains this and another test for huge
      pages, so it's nice to keep it working on them, where does it actually get
      called on a huge page?  get_user_pages() checks is_vm_hugetlb_page(vma) to
      to call alternative hugetlb processing, as does unmap_vmas() and others.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Earlier-version-tested-by: NIngo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jeff Chua <jeff.chua.linux@gmail.com>
      Cc: Hans Rosenfeld <hans.rosenfeld@amd.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aeed5fce
  5. 05 5月, 2008 1 次提交
  6. 04 5月, 2008 5 次提交
  7. 03 5月, 2008 1 次提交
  8. 01 5月, 2008 7 次提交
    • J
      dmi: clean-up dmi helper declarations · ef3fb66c
      Jean Delvare 提交于
      The declaration of dmi helper functions is a bit messy and inconsistent at the
      moment:
      
      * On ia64 they are declared in <asm/io.h>.
      * On x86-64 they are declared in <asm/dmi.h>.
      * On i386 they are declared both in <asm/io.h> and <asm/dmi.h>.
      
      Fix the header files so that the dmi helper functions are consistently
      defined in <asm/dmi.h>.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ef3fb66c
    • R
      remove div_long_long_rem · f8bd2258
      Roman Zippel 提交于
      x86 is the only arch right now, which provides an optimized for
      div_long_long_rem and it has the downside that one has to be very careful that
      the divide doesn't overflow.
      
      The API is a little akward, as the arguments for the unsigned divide are
      signed.  The signed version also doesn't handle a negative divisor and
      produces worse code on 64bit archs.
      
      There is little incentive to keep this API alive, so this converts the few
      users to the new API.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f8bd2258
    • R
      rename div64_64 to div64_u64 · 6f6d6a1a
      Roman Zippel 提交于
      Rename div64_64 to div64_u64 to make it consistent with the other divide
      functions, so it clearly includes the type of the divide.  Move its definition
      to math64.h as currently no architecture overrides the generic implementation.
       They can still override it of course, but the duplicated declarations are
      avoided.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Cc: Avi Kivity <avi@qumranet.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6f6d6a1a
    • R
      introduce explicit signed/unsigned 64bit divide · 2418f4f2
      Roman Zippel 提交于
      The current do_div doesn't explicitly say that it's unsigned and the signed
      counterpart is missing, which is e.g.  needed when dealing with time values.
      
      This introduces 64bit signed/unsigned divide functions which also attempts to
      cleanup the somewhat awkward calling API, which often requires the use of
      temporary variables for the dividend.  To avoid the need for temporary
      variables everywhere for the remainder, each divide variant also provides a
      version which doesn't return the remainder.
      
      Each architecture can now provide optimized versions of these function,
      otherwise generic fallback implementations will be used.
      
      As an example I provided an alternative for the current x86 divide, which
      avoids the asm casts and using an union allows gcc to generate better code.
      It also avoids the upper divde in a few more cases, where the result is known
      (i.e.  upper quotient is zero).
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2418f4f2
    • H
      x86: fix HT cpu booting on 32-bit · 5f464707
      Hugh Dickins 提交于
      Since recent smpboot 32/64-bit merge, my dual Xeon with HT has been
      booting only 2 of its 4 cpus (when running an i386 kernel; but x86_64
      is okay).  J.A. Magallón reports the same.
      
       native_cpu_up: bad cpu 2
       native_cpu_up: bad cpu 3
      
      The mach-default cpu_present_to_apicid() was just returning cpu number
      (2, 3) instead of apicid (6, 7): looks like we now need the x86_64 code
      even for the i386 case.
      
      Comparing with other versions of cpu_present_to_apicid(), it seems a
      good idea to include an NR_CPUS test too, since cpu_present() doesn't
      include that; but that wasn't a problem here, and may no problem at all.
      
      Prior to that smpboot merge, my Xeon booted the two HT siblings on one
      physical first, then the two siblings on the other physical after - when
      i386, but alternated them when x86_64.  Since the merge, the x86_64
      sequence is unchanged, but the i386 sequence is now like x86_64.
      
      I prefer this consistency, and I prefer the new sequence: booting with
      maxcpus=2 then uses the independent physicals without HT sharing.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      5f464707
    • I
      x86 VISWS: build fix · 3e8f7e35
      Ingo Molnar 提交于
      the 'reboot_force' flag is a notion that non-PC subarchitectures do
      not have.
      
      also, unify the X86_BIOS_REBOOT option between 32-bit and 64-bit
      and get rid of a few unnecessary Kconfig and Makefile complications
      that way.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      3e8f7e35
    • A
      x86: remove Xgt_desc_struct · 9cbfe200
      Adrian Bunk 提交于
      The comment says it should have been removed in 2.6.25.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      9cbfe200
  9. 30 4月, 2008 3 次提交
    • J
      asm-*/futex.h should include linux/uaccess.h · 730f412c
      Jeff Dike 提交于
      Lots of asm-*/futex.h call pagefault_enable and pagefault_disable, which
      are declared in linux/uaccess.h, without including linux/uaccess.h.
      
      They all include asm/uaccess.h, so this patch replaces asm/uaccess.h
      with linux/uaccess.h.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      730f412c
    • R
      signals: x86 TS_RESTORE_SIGMASK · 5a8da0ea
      Roland McGrath 提交于
      Replace TIF_RESTORE_SIGMASK with TS_RESTORE_SIGMASK and define our own
      set_restore_sigmask() function.  This saves the costly SMP-safe set_bit
      operation, which we do not need for the sigmask flag since TIF_SIGPENDING
      always has to be set too.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5a8da0ea
    • A
      [IA64] Provide ACPI fixup for /proc/cpuinfo/physical_id · fe086a7b
      Alex Chiang 提交于
      Legacy HP ia64 platforms currently cannot provide
      /proc/cpuinfo/physical_id due to legacy SAL/PAL implementations.
      However, that physical topology information can be obtained
      via ACPI.
      
      Provide an interface that gives ACPI one last chance to provide
      physical_id for these legacy platforms. This logic only comes
      into play iff:
      
      - ACPI actually provides slot information for the CPU
      - we lack a valid socket_id
      
      Otherwise, we don't do anything.
      
      Since x86 uses the ACPI processor driver as well, we provide a nop
      stub function for arch_fix_phys_package_id() in asm-x86/topology.h
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      fe086a7b
  10. 29 4月, 2008 4 次提交
  11. 28 4月, 2008 8 次提交
    • A
      gxfb/lxfb: detect framebuffer size using an MSR if VSA2 isn't available · fd967956
      Andres Salomon 提交于
      If there's no VSA2 (ie, if we're using tinybios or OpenFirmware), use the
      GLIU's P2D Range Offset Descriptor to determine how much memory we have
      available for the framebuffer.
      
      Originally based on a patch by Jordan Crouse.  Tested with OpenFirmware;
      Pascal informs me that tinybios has a stub that fills in P2D_RO0.
      Signed-off-by: NAndres Salomon <dilinger@debian.org>
      Cc: Jordan Crouse <jordan.crouse@amd.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fd967956
    • A
      gxfb/lxfb: use VSA definitions when fetching framebuffer size · 61a517a0
      Andres Salomon 提交于
      ..Rather than using magic constants.
      Signed-off-by: NAndres Salomon <dilinger@debian.org>
      Cc: Jordan Crouse <jordan.crouse@amd.com>
      Cc: "Antonino A. Daplas" <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      61a517a0
    • A
      x86: GEODE: add Virtual Systems Architecture detection · e9338364
      Andres Salomon 提交于
      This is generic VSA2 detection.  It's used by OLPC to determine whether or not
      the BIOS contains VSA2, but since other BIOSes are coming out that don't use
      the VSA (ie, tinybios), it might end up being useful for others.
      Signed-off-by: NAndres Salomon <dilinger@debian.org>
      Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Jordan Crouse <jordan.crouse@amd.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e9338364
    • A
      x86: geode: MSR cleanup · 32bf87e3
      Andres Salomon 提交于
      This cleans up a few MSR-using drivers in the following manner:
        - Ensures MSRs are all defined in asm/geode.h, rather than in misc
          places
        - Makes the naming consistent; cs553[56] ones begin with MSR_,
          GX-specific ones start with MSR_GX_, and LX-specific ones start
          with MSR_LX_.  Also, make the names match the data sheet.
        - Use MSR names rather than numbers in source code
        - Document the fact that the LX's MSR_PADSEL has the wrong value
          in the data sheet.  That's, uh, good to note.
      Signed-off-by: NAndres Salomon <dilinger@debian.org>
      Acked-by: NJordan Crouse <jordan.crouse@amd.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      32bf87e3
    • G
      hugetlbfs: common code update for s390 · 7f2e9525
      Gerald Schaefer 提交于
      Huge ptes have a special type on s390 and cannot be handled with the standard
      pte functions in certain cases, e.g.  because of a different location of the
      invalid bit.  This patch adds some new architecture- specific functions to
      hugetlb common code, as a prerequisite for the s390 large page support.
      
      This won't affect other architectures in functionality, but I need to add some
      new dummy inline functions to the headers.
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7f2e9525
    • G
      hugetlbfs: add missing TLB flush to hugetlb_cow() · 8fe627ec
      Gerald Schaefer 提交于
      A cow break on a hugetlbfs page with page_count > 1 will set a new pte with
      set_huge_pte_at(), w/o any tlb flush operation.  The old pte will remain in
      the tlb and subsequent write access to the page will result in a page fault
      loop, for as long as it may take until the tlb is flushed from somewhere else.
       This patch introduces an architecture-specific huge_ptep_clear_flush()
      function, which is called before the the set_huge_pte_at() in hugetlb_cow().
      
      ATTENTION: This is just a nop on all architectures for now, the s390
      implementation will come with our large page patch later.  Other architectures
      should define their own huge_ptep_clear_flush() if needed.
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8fe627ec
    • G
      hugetlbfs: architecture header cleanup · 6d779079
      Gerald Schaefer 提交于
      This patch moves all architecture functions for hugetlb to architecture header
      files (include/asm-foo/hugetlb.h) and converts all macros to inline functions.
       It also removes (!) ARCH_HAS_HUGEPAGE_ONLY_RANGE,
      ARCH_HAS_HUGETLB_FREE_PGD_RANGE, ARCH_HAS_PREPARE_HUGEPAGE_RANGE,
      ARCH_HAS_SETCLEAR_HUGE_PTE and ARCH_HAS_HUGETLB_PREFAULT_HOOK.
      
      Getting rid of the ARCH_HAS_xxx #ifdef and macro fugliness should increase
      readability and maintainability, at the price of some code duplication.  An
      asm-generic common part would have reduced the loc, but we would end up with
      new ARCH_HAS_xxx defines eventually.
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6d779079
    • N
      mm: introduce pte_special pte bit · 7e675137
      Nick Piggin 提交于
      s390 for one, cannot implement VM_MIXEDMAP with pfn_valid, due to their memory
      model (which is more dynamic than most).  Instead, they had proposed to
      implement it with an additional path through vm_normal_page(), using a bit in
      the pte to determine whether or not the page should be refcounted:
      
      vm_normal_page()
      {
      	...
              if (unlikely(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))) {
                      if (vma->vm_flags & VM_MIXEDMAP) {
      #ifdef s390
      			if (!mixedmap_refcount_pte(pte))
      				return NULL;
      #else
                              if (!pfn_valid(pfn))
                                      return NULL;
      #endif
                              goto out;
                      }
      	...
      }
      
      This is fine, however if we are allowed to use a bit in the pte to determine
      refcountedness, we can use that to _completely_ replace all the vma based
      schemes.  So instead of adding more cases to the already complex vma-based
      scheme, we can have a clearly seperate and simple pte-based scheme (and get
      slightly better code generation in the process):
      
      vm_normal_page()
      {
      #ifdef s390
      	if (!mixedmap_refcount_pte(pte))
      		return NULL;
      	return pte_page(pte);
      #else
      	...
      #endif
      }
      
      And finally, we may rather make this concept usable by any architecture rather
      than making it s390 only, so implement a new type of pte state for this.
      Unfortunately the old vma based code must stay, because some architectures may
      not be able to spare pte bits.  This makes vm_normal_page a little bit more
      ugly than we would like, but the 2 cases are clearly seperate.
      
      So introduce a pte_special pte state, and use it in mm/memory.c.  It is
      currently a noop for all architectures, so this doesn't actually result in any
      compiled code changes to mm/memory.o.
      
      BTW:
      I haven't put vm_normal_page() into arch code as-per an earlier suggestion.
      The reason is that, regardless of where vm_normal_page is actually
      implemented, the *abstraction* is still exactly the same. Also, while it
      depends on whether the architecture has pte_special or not, that is the
      only two possible cases, and it really isn't an arch specific function --
      the role of the arch code should be to provide primitive functions and
      accessors with which to build the core code; pte_special does that. We do
      not want architectures to know or care about vm_normal_page itself, and
      we definitely don't want them being able to invent something new there
      out of sight of mm/ code. If we made vm_normal_page an arch function, then
      we have to make vm_insert_mixed (next patch) an arch function too. So I
      don't think moving it to arch code fundamentally improves any abstractions,
      while it does practically make the code more difficult to follow, for both
      mm and arch developers, and easier to misuse.
      
      [akpm@linux-foundation.org: build fix]
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Acked-by: NCarsten Otte <cotte@de.ibm.com>
      Cc: Jared Hulbert <jaredeh@gmail.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7e675137
  12. 27 4月, 2008 2 次提交