1. 19 2月, 2008 2 次提交
    • A
      remove mca-pentium · 08cd93f9
      Adrian Bunk 提交于
      This patch removes the mca-pentium boot option that was a noop.
      
      besides the source code cleanup factor, this saves some text as well:
      
         arch/x86/kernel/cpu/bugs.o:
            text    data     bss     dec     hex filename
             651      77       4     732     2dc bugs.o.before
             631      53       4     688     2b0 bugs.o.after
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      08cd93f9
    • T
      x86: zap invalid and unused pmds in early boot · 31eedd82
      Thomas Gleixner 提交于
      The early boot code maps KERNEL_TEXT_SIZE (currently 40MB) starting
      from __START_KERNEL_map. The kernel itself only needs _text to _end
      mapped in the high alias. On relocatible kernels the ASM setup code
      adjusts the compile time created high mappings to the relocation. This
      creates invalid pmd entries for negative offsets:
      
      0xffffffff80000000 -> pmd entry: ffffffffff2001e3
      It points outside of the physical address space and is marked present.
      
      This starts at the virtual address __START_KERNEL_map and goes up to
      the point where the first valid physical address (0x0) is mapped.
      
      Zap the mappings before _text and after _end right away in early
      boot. This removes also the invalid entries.
      
      Furthermore it simplifies the range check for high aliases.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      31eedd82
  2. 15 2月, 2008 2 次提交
  3. 13 2月, 2008 1 次提交
    • I
      x86: fix sigcontext.h user export · 1cdde191
      Ingo Molnar 提交于
      Jakub Jelinek reported that some user-space code that relies on
      kernel headers has built dependency on the sigcontext->eip/rip
      register names - which have been unified in commit:
      
        commit 742fa54a
        Author: H. Peter Anvin <hpa@zytor.com>
        Date:   Wed Jan 30 13:30:56 2008 +0100
      
            x86: use generic register names in struct sigcontext
      
      so give the old layout to user-space. This is not particularly
      pretty, but it's an ABI so there's no danger of the two definitions
      getting out of sync.
      Reported-by: NJakub Jelinek <jakub@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1cdde191
  4. 10 2月, 2008 7 次提交
  5. 09 2月, 2008 5 次提交
    • I
      x86: fix pgtable_t build breakage · 3bf8f5a9
      Ingo Molnar 提交于
      Commit 2f569afd ("CONFIG_HIGHPTE vs.
      sub-page page tables") caused some build breakage due to pgtable_t only
      getting declared in the CONFIG_X86_PAE case.
      
      Move the declaration outside the PAE section.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3bf8f5a9
    • M
      CONFIG_HIGHPTE vs. sub-page page tables. · 2f569afd
      Martin Schwidefsky 提交于
      Background: I've implemented 1K/2K page tables for s390.  These sub-page
      page tables are required to properly support the s390 virtualization
      instruction with KVM.  The SIE instruction requires that the page tables
      have 256 page table entries (pte) followed by 256 page status table entries
      (pgste).  The pgstes are only required if the process is using the SIE
      instruction.  The pgstes are updated by the hardware and by the hypervisor
      for a number of reasons, one of them is dirty and reference bit tracking.
      To avoid wasting memory the standard pte table allocation should return
      1K/2K (31/64 bit) and 2K/4K if the process is using SIE.
      
      Problem: Page size on s390 is 4K, page table size is 1K or 2K.  That means
      the s390 version for pte_alloc_one cannot return a pointer to a struct
      page.  Trouble is that with the CONFIG_HIGHPTE feature on x86 pte_alloc_one
      cannot return a pointer to a pte either, since that would require more than
      32 bit for the return value of pte_alloc_one (and the pte * would not be
      accessible since its not kmapped).
      
      Solution: The only solution I found to this dilemma is a new typedef: a
      pgtable_t.  For s390 pgtable_t will be a (pte *) - to be introduced with a
      later patch.  For everybody else it will be a (struct page *).  The
      additional problem with the initialization of the ptl lock and the
      NR_PAGETABLE accounting is solved with a constructor pgtable_page_ctor and
      a destructor pgtable_page_dtor.  The page table allocation and free
      functions need to call these two whenever a page table page is allocated or
      freed.  pmd_populate will get a pgtable_t instead of a struct page pointer.
       To get the pgtable_t back from a pmd entry that has been installed with
      pmd_populate a new function pmd_pgtable is added.  It replaces the pmd_page
      call in free_pte_range and apply_to_pte_range.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2f569afd
    • M
      asm-*/posix_types.h: scrub __GLIBC__ · 531d7d42
      Mike Frysinger 提交于
      Some arches (like alpha and ia64) already have a clean posix_types.h header.
      This brings all the others in line by removing all references to __GLIBC__
      (and some undocumented __USE_ALL).
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      531d7d42
    • D
      aout: suppress A.OUT library support if !CONFIG_ARCH_SUPPORTS_AOUT · 7fa30315
      David Howells 提交于
      Suppress A.OUT library support if CONFIG_ARCH_SUPPORTS_AOUT is not set.
      
      Not all architectures support the A.OUT binfmt, so the ELF binfmt should not
      be permitted to go looking for A.OUT libraries to load in such a case.  Not
      only that, but under such conditions A.OUT core dumps are not produced either.
      
      To make this work, this patch also does the following:
      
       (1) Makes the existence of the contents of linux/a.out.h contingent on
           CONFIG_ARCH_SUPPORTS_AOUT.
      
       (2) Renames dump_thread() to aout_dump_thread() as it's only called by A.OUT
           core dumping code.
      
       (3) Moves aout_dump_thread() into asm/a.out-core.h and makes it inline.  This
           is then included only where needed.  This means that this bit of arch
           code will be stored in the appropriate A.OUT binfmt module rather than
           the core kernel.
      
       (4) Drops A.OUT support for Blackfin (according to Mike Frysinger it's not
           needed) and FRV.
      
      This patch depends on the previous patch to move STACK_TOP[_MAX] out of
      asm/a.out.h and into asm/processor.h as they're required whether or not A.OUT
      format is available.
      
      [jdike@addtoit.com: uml: re-remove accidentally restored code]
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7fa30315
    • D
      aout: move STACK_TOP[_MAX] to asm/processor.h · 922a70d3
      David Howells 提交于
      Move STACK_TOP[_MAX] out of asm/a.out.h and into asm/processor.h as they're
      required whether or not A.OUT format is available.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      922a70d3
  6. 08 2月, 2008 6 次提交
  7. 07 2月, 2008 3 次提交
    • I
      x86: fix deadlock, make pgd_lock irq-safe · 58d5d0d8
      Ingo Molnar 提交于
      lockdep just caught this one:
      
      =================================
      [ INFO: inconsistent lock state ]
      2.6.24 #38
      ---------------------------------
      inconsistent {in-softirq-W} -> {softirq-on-W} usage.
      swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (pgd_lock){-+..}, at: [<ffffffff8022a9ea>] mm_init+0x1da/0x250
      {in-softirq-W} state was registered at:
        [<ffffffffffffffff>] 0xffffffffffffffff
      irq event stamp: 394559
      hardirqs last  enabled at (394559): [<ffffffff80267f0a>] get_page_from_freelist+0x30a/0x4c0
      hardirqs last disabled at (394558): [<ffffffff80267d25>] get_page_from_freelist+0x125/0x4c0
      softirqs last  enabled at (393952): [<ffffffff80232f8e>] __do_softirq+0xce/0xe0
      softirqs last disabled at (393945): [<ffffffff8020c57c>] call_softirq+0x1c/0x30
      
      other info that might help us debug this:
      no locks held by swapper/1.
      
      stack backtrace:
      Pid: 1, comm: swapper Not tainted 2.6.24 #38
      
      Call Trace:
       [<ffffffff8024e1fb>] print_usage_bug+0x18b/0x190
       [<ffffffff8024f55d>] mark_lock+0x53d/0x560
       [<ffffffff8024fffa>] __lock_acquire+0x3ca/0xed0
       [<ffffffff80250ba8>] lock_acquire+0xa8/0xe0
       [<ffffffff8022a9ea>] ? mm_init+0x1da/0x250
       [<ffffffff809bcd10>] _spin_lock+0x30/0x70
       [<ffffffff8022a9ea>] mm_init+0x1da/0x250
       [<ffffffff8022aa99>] mm_alloc+0x39/0x50
       [<ffffffff8028b95a>] bprm_mm_init+0x2a/0x1a0
       [<ffffffff8028d12b>] do_execve+0x7b/0x220
       [<ffffffff80209776>] sys_execve+0x46/0x70
       [<ffffffff8020c214>] kernel_execve+0x64/0xd0
       [<ffffffff8020901e>] ? _stext+0x1e/0x20
       [<ffffffff802090ba>] init_post+0x9a/0xf0
       [<ffffffff809bc5f6>] ? trace_hardirqs_on_thunk+0x35/0x3a
       [<ffffffff8024f75a>] ? trace_hardirqs_on+0xba/0xd0
       [<ffffffff8020c1a8>] ? child_rip+0xa/0x12
       [<ffffffff8020bcbc>] ? restore_args+0x0/0x44
       [<ffffffff8020c19e>] ? child_rip+0x0/0x12
      
      turns out that pgd_lock has been used on 64-bit x86 in an irq-unsafe
      way for almost two years, since commit 8c914cb7.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      58d5d0d8
    • J
      Fix __const_udelay declaration and definition mismatches · 5ab24c79
      Jeff Dike 提交于
      The declaration and implementation of __const_udelay use different
      names for the parameter on a number of architectures:
      
      include/asm-avr32/delay.h:15:extern void __const_udelay(unsigned long usecs);
      arch/avr32/lib/delay.c:39:inline void __const_udelay(unsigned long xloops)
      
      include/asm-sh/delay.h:15:extern void __const_udelay(unsigned long usecs);
      arch/sh/lib/delay.c:22:inline void __const_udelay(unsigned long xloops)
      
      include/asm-m32r/delay.h:15:extern void __const_udelay(unsigned long usecs);
      arch/m32r/lib/delay.c:58:void __const_udelay(unsigned long xloops)
      
      include/asm-x86/delay.h:16:extern void __const_udelay(unsigned long usecs);
      arch/x86/lib/delay_32.c:82:inline void __const_udelay(unsigned long xloops)
      arch/x86/lib/delay_64.c:46:inline void __const_udelay(unsigned long xloops)
      
      The units of the parameter isn't usecs, so that name is definitely
      wrong.  It's also not exactly loops, so I suppose xloops is an OK
      name.
      
      This patch changes these names from usecs to xloops.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5ab24c79
    • A
      read_current_timer() cleanups · 941e492b
      Andrew Morton 提交于
      - All implementations can be __devinit
      
      - The function prototypes were in asm/timex.h but they all must be the same,
        so create a single declaration in linux/timex.h.
      
      - uninline the sparc64 version to match the other architectures
      
      - Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.
      
      [ezk@cs.sunysb.edu: fix build]
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      941e492b
  8. 06 2月, 2008 4 次提交
  9. 04 2月, 2008 10 次提交