1. 10 2月, 2008 22 次提交
  2. 09 2月, 2008 18 次提交
    • S
      ide: introduce HAVE_IDE · ec7748b5
      Sam Ravnborg 提交于
      To allow flexible configuration of IDE introduce HAVE_IDE.
      All archs except arm, um and s390 unconditionally select it.
      For arm the actual configuration determine if IDE is supported.
      
      This is a step towards introducing drivers/Kconfig for arm.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Acked-by: NRussell King - ARM Linux <linux@arm.linux.org.uk>
      Acked-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ec7748b5
    • V
      cpuidle: build fix for non-x86 · a6869cc4
      Venki Pallipadi 提交于
      The last posted version of this patch gave compile error
      on IA64. So, here goes yet another rewrite of the patch.
      
      Convert cpu_idle_wait() to cpuidle_kick_cpus() which is
      SMP-only, and gives error on non supported CPU.
      
      Changes from last patch sent by Kevin:
      Moved the definition of kick_cpus back to cpuidle.c from cpuidle.h:
      * Having it in .h gives #error on archs which includes the header file without
        actually having CPU_IDLE configured. To make it work in .h, we need one more
        #ifdef around that code which makes it messy.
      * Also, the function is only called from one file. So, it can be in declared
        statically in .c rather than making it available to everyone who includes
        the .h file.
      Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NKevin Hilman <khilman@mvista.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a6869cc4
    • R
      [IA64] Fix large MCA bootmem allocation · 785285fc
      Russ Anderson 提交于
      The MCA code allocates bootmem memory for NR_CPUS, regardless
      of how many cpus the system actually has.  This change allocates
      memory only for cpus that actually exist.
      
      On my test system with NR_CPUS = 1024, reserved memory was reduced by 130944k.
      
      Before: Memory: 27886976k/28111168k available (8282k code, 242304k reserved, 5928k data, 1792k init)
      After:  Memory: 28017920k/28111168k available (8282k code, 111360k reserved, 5928k data, 1792k init)
      Signed-off-by: NRuss Anderson <rja@sgi.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      785285fc
    • T
      [IA64] Simplify cpu_idle_wait · 42763935
      Tony Luck 提交于
      This is just Venki's patch[*] for x86 ported to ia64.
      
      * http://marc.info/?l=linux-kernel&m=120249201318159&w=2Acked-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      42763935
    • P
      [IA64] Synchronize RBS on PTRACE_ATTACH · aa91a2e9
      Petr Tesarik 提交于
      When attaching to a stopped process, the RSE must be explicitly
      synced to user-space, so the debugger can read the correct values.
      Signed-off-by: NPetr Tesarik <ptesarik@suse.cz>
      CC: Roland McGrath <roland@redhat.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      aa91a2e9
    • P
      [IA64] Synchronize kernel RSE to user-space and back · 3b2ce0b1
      Petr Tesarik 提交于
      This is base kernel patch for ptrace RSE bug. It's basically a backport
      from the utrace RSE patch I sent out several weeks ago. please review.
      
      when a thread is stopped (ptraced), debugger might change thread's user
      stack (change memory directly), and we must avoid the RSE stored in
      kernel to override user stack (user space's RSE is newer than kernel's
      in the case). To workaround the issue, we copy kernel RSE to user RSE
      before the task is stopped, so user RSE has updated data.  we then copy
      user RSE to kernel after the task is resummed from traced stop and
      kernel will use the newer RSE to return to user.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NPetr Tesarik <ptesarik@suse.cz>
      CC: Roland McGrath <roland@redhat.com>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      3b2ce0b1
    • P
      [IA64] Rename TIF_PERFMON_WORK back to TIF_NOTIFY_RESUME · 5aa92ffd
      Petr Tesarik 提交于
      Since the RSE synchronization will need a TIF_ flag, but all
      
      work-to-be-done bits are already used, so we have to multiplex
      TIF_NOTIFY_RESUME again.
      Signed-off-by: NShaohua Li <shaohua.li@intel.com>
      Signed-off-by: NPetr Tesarik <ptesarik@suse.cz>
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      5aa92ffd
    • T
      [IA64] Wire up timerfd_{create,settime,gettime} syscalls · ad9e39c7
      Tony Luck 提交于
      Add ia64 hooks for the new syscalls that were added in
      commit 4d672e7aSigned-off-by: NTony Luck <tony.luck@intel.com>
      ad9e39c7
    • M
    • J
      uml: fix mm_context memory leak · ac2a6599
      Jeff Dike 提交于
      [ Spotted by Miklos ]
      
      Fix a memory leak in init_new_context.  The struct page ** buffer allocated
      for install_special_mapping was never recorded, and thus leaked when the
      mm_struct was freed.  Fix it by saving the pointer in mm_context_t and freeing
      it in arch_exit_mmap.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ac2a6599
    • J
      uml: improved error handling while locating temp dir · 11a7ac23
      Jim Meyering 提交于
      * arch/um/os-Linux/mem.c (make_tempfile): Don't deref NULL upon failed malloc.
      
      * arch/um/os-Linux/mem.c (make_tempfile): Handle NULL tempdir.
      Don't let a long tempdir (e.g., via TMPDIR) provoke heap corruption.
      
      [ jdike - formatting cleanups, deleted obsolete comment ]
      Signed-off-by: NJim Meyering <meyering@redhat.com>
      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>
      11a7ac23
    • J
      uml: style fixes in arch/um/os-Linux · 5134d8fe
      Jeff Dike 提交于
      Style changes under arch/um/os-Linux:
      	include trimming
      	CodingStyle fixes
      	some printks needed severity indicators
      
      make_tempfile turns out not to be used outside of mem.c, so it is now static.
      Its declaration in tempfile.h is no longer needed, and tempfile.h itself is no
      longer needed.
      
      create_tmp_file was also made static.
      
      checkpatch moans about an EXPORT_SYMBOL in user_syms.c which is part of a
      macro definition - this is copying a bit of kernel infrastructure into the
      libc side of UML because the kernel headers can't be included there.
      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>
      5134d8fe
    • J
      uml: runtime host VMSPLIT detection · 536788fe
      Jeff Dike 提交于
      Calculate TASK_SIZE at run-time by figuring out the host's VMSPLIT - this is
      needed on i386 if UML is to run on hosts with varying VMSPLITs without
      recompilation.
      
      TASK_SIZE is now defined in terms of a variable, task_size.  This gets rid of
      an include of pgtable.h from processor.h, which can cause include loops.
      
      On i386, task_size is calculated early in boot by probing the address space in
      a binary search to figure out where the boundary between usable and non-usable
      memory is.  This tries to make sure that a page that is considered to be in
      userspace is, or can be made, read-write.  I'm concerned about a system-global
      VDSO page in kernel memory being hit and considered to be a userspace page.
      
      On x86_64, task_size is just the old value of CONFIG_TOP_ADDR.
      
      A bunch of config variable are gone now.  CONFIG_TOP_ADDR is directly replaced
      by TASK_SIZE.  NEST_LEVEL is gone since the relocation of the stubs makes it
      irrelevant.  All the HOST_VMSPLIT stuff is gone.  All references to these in
      arch/um/Makefile are also gone.
      
      I noticed and fixed a missing extern in os.h when adding os_get_task_size.
      
      Note: This has been revised to fix the 32-bit UML on 64-bit host bug that
      Miklos ran into.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      536788fe
    • 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
    • R
      MIPS: Mark all but i8259 interrupts as no-probe. · 24649c00
      Ralf Baechle 提交于
      Use set_irq_noprobe() to mark all MIPS interrupts as non-probe.  Override that
      default for i8259 interrupts.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Acked-and-tested-by: NRob Landley <rob@landley.net>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      24649c00
    • M
      mount options: fix spufs · 90d09e14
      Miklos Szeredi 提交于
      Add a .show_options super operation to spufs.
      
      Use generic_show_options() and save the complete option string in
      spufs_fill_super().
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      90d09e14
    • H
      avoid overflows in kernel/time.c · bdc80787
      H. Peter Anvin 提交于
      When the conversion factor between jiffies and milli- or microseconds is
      not a single multiply or divide, as for the case of HZ == 300, we currently
      do a multiply followed by a divide.  The intervening result, however, is
      subject to overflows, especially since the fraction is not simplified (for
      HZ == 300, we multiply by 300 and divide by 1000).
      
      This is exposed to the user when passing a large timeout to poll(), for
      example.
      
      This patch replaces the multiply-divide with a reciprocal multiplication on
      32-bit platforms.  When the input is an unsigned long, there is no portable
      way to do this on 64-bit platforms there is no portable way to do this
      since it requires a 128-bit intermediate result (which gcc does support on
      64-bit platforms but may generate libgcc calls, e.g.  on 64-bit s390), but
      since the output is a 32-bit integer in the cases affected, just simplify
      the multiply-divide (*3/10 instead of *300/1000).
      
      The reciprocal multiply used can have off-by-one errors in the upper half
      of the valid output range.  This could be avoided at the expense of having
      to deal with a potential 65-bit intermediate result.  Since the intent is
      to avoid overflow problems and most of the other time conversions are only
      semiexact, the off-by-one errors were considered an acceptable tradeoff.
      
      At Ralf Baechle's suggestion, this version uses a Perl script to compute
      the necessary constants.  We already have dependencies on Perl for kernel
      compiles.  This does, however, require the Perl module Math::BigInt, which
      is included in the standard Perl distribution starting with version 5.8.0.
      In order to support older versions of Perl, include a table of canned
      constants in the script itself, and structure the script so that
      Math::BigInt isn't required if pulling values from said table.
      
      Running the script requires that the HZ value is available from the
      Makefile.  Thus, this patch also adds the Kconfig variable CONFIG_HZ to the
      architectures which didn't already have it (alpha, cris, frv, h8300, m32r,
      m68k, m68knommu, sparc, v850, and xtensa.) It does *not* touch the sh or
      sh64 architectures, since Paul Mundt has dealt with those separately in the
      sh tree.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>,
      Cc: Sam Ravnborg <sam@ravnborg.org>,
      Cc: Paul Mundt <lethal@linux-sh.org>,
      Cc: Richard Henderson <rth@twiddle.net>,
      Cc: Michael Starvik <starvik@axis.com>,
      Cc: David Howells <dhowells@redhat.com>,
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
      Cc: Hirokazu Takata <takata@linux-m32r.org>,
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
      Cc: Roman Zippel <zippel@linux-m68k.org>,
      Cc: William L. Irwin <sparclinux@vger.kernel.org>,
      Cc: Chris Zankel <chris@zankel.net>,
      Cc: H. Peter Anvin <hpa@zytor.com>,
      Cc: Jan Engelhardt <jengelh@computergmbh.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bdc80787
    • D
      Basic PWM driver for AVR32 and AT91 · 9a1e8eb1
      David Brownell 提交于
      PWM device setup, and a simple PWM driver exposing a programming interface
      giving access to each channel's full capabilities.  Note that this doesn't
      support starting several channels in synch.
      
      [hskinnemoen@atmel.com: allocate platform device dynamically]
      [hskinnemoen@atmel.com: Kconfig fix]
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Andrew Victor <linux@maxim.org.za>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9a1e8eb1