1. 13 6月, 2008 26 次提交
  2. 12 6月, 2008 14 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes · 95dcf835
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
        kbuild: ignore powerpc specific symbols in modpost
      95dcf835
    • P
      nommu: Correct kobjsize() page validity checks. · 5a1603be
      Paul Mundt 提交于
      This implements a few changes on top of the recent kobjsize() refactoring
      introduced by commit 6cfd53fc.
      
      As Christoph points out:
      
      	virt_to_head_page cannot return NULL. virt_to_page also
      	does not return NULL. pfn_valid() needs to be used to
      	figure out if a page is valid.  Otherwise the page struct
      	reference that was returned may have PageReserved() set
      	to indicate that it is not a valid page.
      
      As discussed further in the thread, virt_addr_valid() is the preferable
      way to validate the object pointer in this case. In addition to fixing
      up the reserved page case, it also has the benefit of encapsulating the
      hack introduced by commit 4016a139 on
      the impacted platforms, allowing us to get rid of the extra checking in
      kobjsize() for the platforms that don't perform this type of bizarre
      memory_end abuse (every nommu platform that isn't blackfin). If blackfin
      decides to get in line with every other platform and use PageReserved
      for the DMA pages in question, kobjsize() will also continue to work
      fine.
      
      It also turns out that compound_order() will give us back 0-order for
      non-head pages, so we can get rid of the PageCompound check and just
      use compound_order() directly. Clean that up while we're at it.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      Reviewed-by: NChristoph Lameter <clameter@sgi.com>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5a1603be
    • J
      fsl-diu-db: compile fix · f969c567
      Jeff Mahoney 提交于
      This patch fixes a compile failure in 2.6.26-rc5-git5.
      
      The variable is expected to be called ofdev.
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f969c567
    • L
      Merge branch 'core/iter-div' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip · dc10885d
      Linus Torvalds 提交于
      * 'core/iter-div' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        always_inline timespec_add_ns
        add an inlined version of iter_div_u64_rem
        common implementation of iterative div/mod
      dc10885d
    • S
      kbuild: ignore powerpc specific symbols in modpost · 4d7365d6
      Sam Ravnborg 提交于
      Kumar Gala <galak@kernel.crashing.org> wrote:
      We have a case in powerpc in which we want to link some library
      routines with all module objects.  The routines are intended for
      handling out-of-line function call register save/restore so having
      them as EXPORT_SYMBOL() is counter productive (we do also need to
      link the same "library" code into the kernel).
      
      Without this patch a powerpc build would error out and fail
      to build modules with the added register save/restore module.
      
      There were two obvious solutions:
      1) To link the .o file before the modpost stage
      2) To ignore the symbols in modpost
      
      Option 1) was ruled out because we do not have any separate
      linking stage for single file modules.
      
      This patch implements option 2 - and do so only for powerpc.
      
      The symbols we ignore are all undefined symbols named:
      _restgpr_*, _savegpr_*, _rest32gpr_*, _save32gpr_*
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      4d7365d6
    • L
      sched: 64-bit: fix arithmetics overflow · 7a232e03
      Lai Jiangshan 提交于
      (overflow means weight >= 2^32 here, because inv_weigh = 2^32/weight)
      
      A weight of a cfs_rq is the sum of weights of which entities
      are queued on this cfs_rq, so it will overflow when there are
      too many entities.
      
      Although, overflow occurs very rarely, but it break fairness when
      it occurs. 64-bits systems have more memory than 32-bit systems
      and 64-bit systems can create more process usually, so overflow may
      occur more frequently.
      
      This patch guarantees fairness when overflow happens on 64-bit systems.
      Thanks to the optimization of compiler, it changes nothing on 32-bit.
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      7a232e03
    • L
      sched: fair group: fix overflow(was: fix divide by zero) · 2e084786
      Lai Jiangshan 提交于
      I found a bug which can be reproduced by this way:(linux-2.6.26-rc5, x86-64)
      (use 2^32, 2^33, ...., 2^63 as shares value)
      
      # mkdir /dev/cpuctl
      # mount -t cgroup -o cpu cpuctl /dev/cpuctl
      # cd /dev/cpuctl
      # mkdir sub
      # echo 0x8000000000000000 > sub/cpu.shares
      # echo $$ > sub/tasks
      oops here! divide by zero.
      
      This is because do_div() expects the 2th parameter to be 32 bits,
      but unsigned long is 64 bits in x86_64.
      
      Peter Zijstra pointed it out that the sane thing to do is limit the
      shares value to something smaller instead of using an even more
      expensive divide.
      
      Also, I found another bug about "the shares value is too large":
      
      pid1 and pid2 are set affinity to cpu#0
      pid1 is attached to cg1 and pid2 is attached to cg2
      
      if cg1/cpu.shares = 1024 cg2/cpu.shares = 2000000000
      then pid2 got 100% usage of cpu, and pid1 0%
      
      if cg1/cpu.shares = 1024 cg2/cpu.shares = 20000000000
      then pid2 got 0% usage of cpu, and pid1 100%
      
      And a weight of a cfs_rq is the sum of weights of which entities
      are queued on this cfs_rq, so the shares value should be limited
      to a smaller value.
      
      I think that (1UL << 18) is a good limited value:
      
      1) it's not too large, we can create a lot of group before overflow
      2) it's several times the weight value for nice=-19 (not too small)
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2e084786
    • J
      always_inline timespec_add_ns · 9412e286
      Jeremy Fitzhardinge 提交于
      timespec_add_ns is used from the x86-64 vdso, which cannot call out to
      other kernel code.  Make sure that timespec_add_ns is always inlined
      (and only uses always_inlined functions) to make sure there are no
      unexpected calls.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9412e286
    • J
      add an inlined version of iter_div_u64_rem · d5e181f7
      Jeremy Fitzhardinge 提交于
      iter_div_u64_rem is used in the x86-64 vdso, which cannot call other
      kernel code.  For this case, provide the always_inlined version,
      __iter_div_u64_rem.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d5e181f7
    • J
      common implementation of iterative div/mod · f595ec96
      Jeremy Fitzhardinge 提交于
      We have a few instances of the open-coded iterative div/mod loop, used
      when we don't expcet the dividend to be much bigger than the divisor.
      Unfortunately modern gcc's have the tendency to strength "reduce" this
      into a full mod operation, which isn't necessarily any faster, and
      even if it were, doesn't exist if gcc implements it in libgcc.
      
      The workaround is to put a dummy asm statement in the loop to prevent
      gcc from performing the transformation.
      
      This patch creates a single implementation of this loop, and uses it
      to replace the open-coded versions I know about.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Segher Boessenkool <segher@kernel.crashing.org>
      Cc: Christian Kujau <lists@nerdbynature.de>
      Cc: Robert Hancock <hancockr@shaw.ca>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f595ec96
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 · 631025b4
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
        USB: don't use reset-resume if drivers don't support it
        USB: isp1760: Assign resource fields before adding hcd
        isight_firmware: Avoid crash on loading invalid firmware
        USB: fix build bug in USB_ISIGHTFW
      631025b4
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 · aaef4d6c
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
        kobject: Documentation Spelling Patch
        dev_set_name: fix missing kernel-doc
      aaef4d6c
    • L
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 · da50ccc6
      Linus Torvalds 提交于
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (23 commits)
        ACPICA: fix stray va_end() caused by mis-merge
        ACPI: Reject below-freezing temperatures as invalid critical temperatures
        ACPICA: Fix for access to deleted object <regression>
        ACPICA: Fix to make _SST method optional
        ACPICA: Fix for Load operator, load table at the namespace root
        ACPICA: Ignore ACPI table signature for Load() operator
        ACPICA: Fix to allow zero-length ASL field declarations
        ACPI: use memory_read_from_buffer()
        bay: exit if notify handler cannot be installed
        dock.c remove trailing printk whitespace
        proper prototype for acpi_processor_tstate_has_changed()
        ACPI: handle invalid ACPI SLIT table
        PNPACPI: use _CRS IRQ descriptor length for _SRS
        pnpacpi: fix shareable IRQ encode/decode
        pnpacpi: fix IRQ flag decoding
        MAINTAINERS: update ACPI homepage
        ACPI 2.6.26-rc2: Add missing newline to DSDT/SSDT warning message
        ACPI: EC: Use msleep instead of udelay while waiting for event.
        thinkpad-acpi: fix LED handling on older ThinkPads
        thinkpad-acpi: fix initialization error paths
        ...
      da50ccc6
    • L
      USB: don't use reset-resume if drivers don't support it · 5340ba82
      Linus Torvalds 提交于
      This patch tries to identify which devices are able to accept
      reset-resume handling, by checking that there is at least one
      interface driver bound and that all of the drivers have a reset_resume
      method defined.  If these conditions don't hold then during resume
      processing, the device is logicall disconnected.
      
      This is only a temporary fix.  Later on we will explicitly unbind
      drivers that can't handle reset-resumes.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Pavel Machek <pavel@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5340ba82