25 Aug, 2010

13 commits

  • Huaxu and Rudolf want me to be the hwmon coretemp driver maintainer and
    remove their names from the coretemp maintainer entry.

    Signed-off-by: Fenghua Yu
    Acked-by: Rudolf Marek
    Acked-by: Huaxu Wan
    Signed-off-by: Jean Delvare

    Fenghua Yu
     
  • Commit 8bf0223ed515be24de0c671eedaff49e78bebc9c (hwmon, k8temp: Fix
    temperature reporting for ASB1 processor revisions) fixed temperature
    reporting for ASB1 CPUs. But those CPU models (model 0x6b, 0x6f, 0x7f)
    were packaged both as AM2 (desktop) and ASB1 (mobile). Thus the commit
    leads to wrong temperature reporting for AM2 CPU parts.

    The solution is to determine the package type for models 0x6b, 0x6f,
    0x7f.

    This is done using BrandId from CPUID Fn8000_0001_EBX[15:0]. See
    "Constructing the processor Name String" in "Revision Guide for AMD
    NPT Family 0Fh Processors" (Rev. 3.46).

    Cc: Rudolf Marek
    Cc: stable@kernel.org [.32.x, .33.x, .34.x, .35.x]
    Reported-by: Vladislav Guberinic
    Signed-off-by: Andreas Herrmann
    Signed-off-by: Jean Delvare

    Andreas Herrmann
     
  • 1. remove 'status' variable
    2. remove unneeded initialization of 'err' variable
    3. return missing error code if sysfs_create_group fail.
    4. fix the init sequence as:
    - check hardware existence
    - kzalloc for ads7871_data
    - sysfs_create_group
    - hwmon_device_register

    Signed-off-by: Axel Lin
    Cc: stable@kernel.org
    Signed-off-by: Jean Delvare

    Axel Lin
     
  • Fix the following build warning:

    CC [M] drivers/hwmon/coretemp.o
    drivers/hwmon/coretemp.c: In function "coretemp_init":
    drivers/hwmon/coretemp.c:521: warning: unused variable "n"
    drivers/hwmon/coretemp.c:521: warning: unused variable "p"

    Introduced by commit 851b29cb3b196cb66452ec964ab5f66c9c9cd1ed. When
    you drop code, you also have to drop the variables this code was
    using.

    Signed-off-by: Jean Delvare
    Cc: Chen Gong
    Cc: Rudolf Marek
    Cc: Huaxu Wan

    Jean Delvare
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    watchdog: Don't throttle the watchdog
    tracing: Fix timer tracing

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    mutex: Improve the scalability of optimistic spinning

    Linus Torvalds
     
  • pa-risc and ia64 have stacks that grow upwards. Check that
    they do not run into other mappings. By making VM_GROWSUP
    0x0 on architectures that do not ever use it, we can avoid
    some unpleasant #ifdefs in check_stack_guard_page().

    Signed-off-by: Tony Luck
    Signed-off-by: Linus Torvalds

    Luck, Tony
     
  • When converting this to the new wait_for macro I inverted the wait
    condition, which causes all sorts of problems. So correct it to fix
    several failures caused by the bad wait (flickering, bad output
    detection, tearing, etc.).

    Reviewed-by: Chris Wilson
    Tested-by: Sitsofe Wheeler
    Signed-off-by: Jesse Barnes
    Signed-off-by: Linus Torvalds

    Jesse Barnes
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
    [S390] fix tlb flushing vs. concurrent /proc accesses
    [S390] s390: fix build error (sys_execve)

    Linus Torvalds
     
  • We should pass the data to the data register.

    Signed-off-by: Jianwei Yang
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Jianwei Yang
     
  • It looks like there is an off-by-one error in one of your changes to
    drivers/staging/rar_register/rar_register.c:

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Ossama Othman
     
  • This build bug triggers:

    drivers/built-in.o: In function `mantis_exit':
    (.text+0x377413): undefined reference to `ir_input_unregister'
    drivers/built-in.o: In function `mantis_input_init':
    (.text+0x3774ff): undefined reference to `__ir_input_register'

    If MANTIS_CORE is enabled but IR_CORE is not. Add the correct
    dependency.

    Signed-off-by: Ingo Molnar
    Acked-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Get rid of indirect p1275 PROM call buffer.
    sparc64: Fill a missing delay slot.
    sparc64: Make lock backoff really a NOP on UP builds.
    sparc64: simple microoptimizations for atomic functions
    sparc64: Make rwsems 64-bit.
    sparc64: Really fix atomic64_t interface types.

    Linus Torvalds
     

24 Aug, 2010

27 commits

  • The tlb flushing code uses the mm_users field of the mm_struct to
    decide if each page table entry needs to be flushed individually with
    IPTE or if a global flush for the mm_struct is sufficient after all page
    table updates have been done. The comment for mm_users says "How many
    users with user space?" but the /proc code increases mm_users after it
    found the process structure by pid without creating a new user process.
    Which makes mm_users useless for the decision between the two tlb
    flusing methods. The current code can be confused to not flush tlb
    entries by a concurrent access to /proc files if e.g. a fork is in
    progres. The solution for this problem is to make the tlb flushing
    logic independent from the mm_users field.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (25 commits)
    powerpc: Fix config dependency problem with MPIC_U3_HT_IRQS
    via-pmu: Add compat_pmu_ioctl
    powerpc: Wire up fanotify_init, fanotify_mark, prlimit64 syscalls
    powerpc/pci: Fix checking for child bridges in PCI code.
    powerpc: Fix typo in uImage target
    powerpc: Initialise paca->kstack before early_setup_secondary
    powerpc: Fix bogus it_blocksize in VIO iommu code
    powerpc: Inline ppc64_runlatch_off
    powerpc: Correct smt_enabled=X boot option for > 2 threads per core
    powerpc: Silence xics_migrate_irqs_away() during cpu offline
    powerpc: Silence __cpu_up() under normal operation
    powerpc: Re-enable preemption before cpu_die()
    powerpc/pci: Drop unnecessary null test
    powerpc/powermac: Drop unnecessary null test
    powerpc/powermac: Drop unnecessary of_node_put
    powerpc/kdump: Stop all other CPUs before running crash handlers
    powerpc/mm: Fix vsid_scrample typo
    powerpc: Use is_32bit_task() helper to test 32 bit binary
    powerpc: Export memstart_addr and kernstart_addr on ppc64
    powerpc: Make rwsem use "long" type
    ...

    Linus Torvalds
     
  • fix this build error:
    arch/s390/kernel/process.c:272: error: conflicting types for 'sys_execve'
    arch/s390/kernel/entry.h:45: error: previous declaration of 'sys_execve' was here
    make[1]: *** [arch/s390/kernel/process.o] Error 1
    make: *** [arch/s390/kernel] Error 2

    introduced by d7627467b7a8dd6944885290a03a07ceb28c10eb

    Signed-off-by: Sebastian Ott
    Signed-off-by: Martin Schwidefsky

    Sebastian Ott
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
    Staging: sep: remove driver
    Staging: batman-adv: Don't write in not allocated packet_buff
    Staging: batman-adv: Don't use net_dev after dev_put
    Staging: batman-adv: Create batman_if only on register event
    Staging: batman-adv: fix own mac address detection
    Staging: batman-adv: always reply batman icmp packets with primary mac
    Staging: batman-adv: fix batman icmp originating from secondary interface
    Staging: batman-adv: unify orig_hash_lock spinlock handling to avoid deadlocks
    Staging: batman-adv: Fix merge of linus tree
    Staging: spectra: removes unused functions
    Staging: spectra: initializa lblk variable
    Staging: spectra: removes unused variable
    Staging: spectra: remove duplicate GLOB_VERSION definition
    Staging: spectra: don't use locked_ioctl, fix build
    Staging: use new REQ_FLUSH flag, fix build breakage
    Staging: spectra: removes q->prepare_flush_fn, fix build breakage

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
    68328serial: check return value of copy_*_user() instead of access_ok()
    synclink: add mutex_unlock() on error path
    rocket: add a mutex_unlock()
    ip2: return -EFAULT on copy_to_user errors
    ip2: remove unneeded NULL check
    serial: print early console device address in hex

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
    kobject_uevent: fix typo in comments
    firmware_class: fix typo in error path
    kobject: Break the kobject namespace defs into their own header

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (29 commits)
    ARM: imx: fix build failure concerning otg/ulpi
    USB: ftdi_sio: add product ID for Lenz LI-USB
    USB: adutux: fix misuse of return value of copy_to_user()
    USB: iowarrior: fix misuse of return value of copy_to_user()
    USB: xHCI: update ring dequeue pointer when process missed tds
    USB: xhci: Remove buggy assignment in next_trb()
    USB: ftdi_sio: Add ID for Ionics PlugComputer
    USB: serial: io_ti.c: don't return 0 if writing the download record failed
    USB: otg: twl4030: fix wrong assumption of starting state
    USB: gadget: Return -ENOMEM on memory allocation failure
    USB: gadget: fix composite kernel-doc warnings
    USB: ssu100: set tty_flags in ssu100_process_packet
    USB: ssu100: add disconnect function for ssu100
    USB: serial: export symbol usb_serial_generic_disconnect
    USB: ssu100: rework logic for TIOCMIWAIT
    USB: ssu100: add register parameter to ssu100_setregister
    USB: ssu100: remove duplicate #defines in ssu100
    USB: ssu100: refine process_packet in ssu100
    USB: ssu100: add locking for port private data in ssu100
    USB: r8a66597-udc: return -ENOMEM if kzalloc() fails
    ...

    Linus Torvalds
     
  • This is based upon a report by Meelis Roos showing that it's possible
    that we'll try to fetch a property that is 32K in size with some
    devices. With the current fixed 3K buffer we use for moving data in
    and out of the firmware during PROM calls, that simply won't work.

    In fact, it will scramble random kernel data during bootup.

    The reasoning behind the temporary buffer is entirely historical. It
    used to be the case that we had problems referencing dynamic kernel
    memory (including the stack) early in the boot process before we
    explicitly told the firwmare to switch us over to the kernel trap
    table.

    So what we did was always give the firmware buffers that were locked
    into the main kernel image.

    But we no longer have problems like that, so get rid of all of this
    indirect bounce buffering.

    Besides fixing Meelis's bug, this also makes the kernel data about 3K
    smaller.

    It was also discovered during these conversions that the
    implementation of prom_retain() was completely wrong, so that was
    fixed here as well. Currently that interface is not in use.

    Reported-by: Meelis Roos
    Tested-by: Meelis Roos
    Signed-off-by: David S. Miller

    David S. Miller
     
  • MPIC_U3_HT_IRQS is selected both by PPC_PMAC64 and PPC_MAPLE, but depends
    on PPC_MAPLE, so a PPC_PMAC64-only config gets this warning:

    warning: (PPC_PMAC64 && PPC_PMAC && POWER4 || PPC_MAPLE && PPC64 && PPC_BOOK3S) selects MPIC_U3_HT_IRQS which has unmet direct dependencies (PPC_MAPLE)

    Fix that by removing the dependency on PPC_MAPLE.

    Signed-off-by: Andreas Schwab
    Signed-off-by: Benjamin Herrenschmidt

    Andreas Schwab
     
  • The ioctls are actually compatible, but due to historical mistake the
    numbers differ between 32bit and 64bit.

    Signed-off-by: Andreas Schwab
    Acked-by: Arnd Bergmann
    Signed-off-by: Benjamin Herrenschmidt

    Andreas Schwab
     
  • Signed-off-by: Andreas Schwab
    Signed-off-by: Benjamin Herrenschmidt

    Andreas Schwab
     
  • pci_device_to_OF_node() can return null, and list_for_each_entry will
    never enter the loop when dev is NULL, so it looks like this test is
    a typo.

    Reported-by: Julia Lawall
    Signed-off-by: Grant Likely
    Signed-off-by: Benjamin Herrenschmidt

    Grant Likely
     
  • Commit e32e78c5ee8aadef020fbaecbe6fb741ed9029fd
    (powerpc: fix build with make 3.82) introduced a
    typo in uImage target and broke building uImage:

    make: *** No rule to make target `uImage'. Stop.

    Signed-off-by: Anatolij Gustschin
    Cc: stable
    Signed-off-by: Benjamin Herrenschmidt

    Anatolij Gustschin
     
  • As early setup calls down to slb_initialize(), we must have kstack
    initialised before checking "should we add a bolted SLB entry for our kstack?"

    Failing to do so means stack access requires an SLB miss exception to refill
    an entry dynamically, if the stack isn't accessible via SLB(0) (kernel text
    & static data). It's not always allowable to take such a miss, and
    intermittent crashes will result.

    Primary CPUs don't have this issue; an SLB entry is not bolted for their
    stack anyway (as that lives within SLB(0)). This patch therefore only
    affects the init of secondaries.

    Signed-off-by: Matt Evans
    Cc: stable
    Signed-off-by: Benjamin Herrenschmidt

    Matt Evans
     
  • When looking at some issues with the virtual ethernet driver I noticed
    that TCE allocation was following a very strange pattern:

    address 00e9000 length 2048
    address 0409000 length 2048
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • I'm sick of seeing ppc64_runlatch_off in our profiles, so inline it
    into the callers. To avoid a mess of circular includes I didn't add
    it as an inline function.

    Signed-off-by: Anton Blanchard
    Acked-by: Olof Johansson
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • The 'smt_enabled=X' boot option does not handle values of X > 2.
    For Power 7 processors with smt modes of 0,1,2,3, and 4 this does
    not work. This patch allows the smt_enabled option to be set to
    any value limited to a max equal to the number of threads per
    core.

    Signed-off-by: Nathan Fontenot
    Signed-off-by: Benjamin Herrenschmidt

    Nathan Fontenot
     
  • All IRQs are migrated away from a CPU that is being offlined so the
    following messages suggest a problem when the system is behaving as
    designed:

    IRQ 262 affinity broken off cpu 1
    IRQ 17 affinity broken off cpu 0
    IRQ 18 affinity broken off cpu 0
    IRQ 19 affinity broken off cpu 0
    IRQ 256 affinity broken off cpu 0
    IRQ 261 affinity broken off cpu 0
    IRQ 262 affinity broken off cpu 0

    Don't print these messages when the CPU is not online.

    Signed-off-by: Darren Hart
    Acked-by: Will Schmidt
    Cc: Thomas Gleixner
    Cc: Nathan Fontenot
    Cc: Robert Jennings
    Cc: Brian King
    Signed-off-by: Benjamin Herrenschmidt

    Signed-off-by: Darren Hart
     
  • During CPU offline/online tests __cpu_up would flood the logs with
    the following message:

    Processor 0 found.

    This provides no useful information to the user as there is no context
    provided, and since the operation was a success (to this point) it is expected
    that the CPU will come back online, providing all the feedback necessary.

    Change the "Processor found" message to DBG() similar to other such messages in
    the same function. Also, add an appropriate log level for the "Processor is
    stuck" message.

    Signed-off-by: Darren Hart
    Acked-by: Will Schmidt
    Cc: Thomas Gleixner
    Cc: Nathan Fontenot
    Cc: Robert Jennings
    Cc: Brian King
    Signed-off-by: Benjamin Herrenschmidt

    Signed-off-by: Darren Hart
     
  • start_secondary() is called shortly after _start and also via

    cpu_idle()->cpu_die()->pseries_mach_cpu_die()

    start_secondary() expects a preempt_count() of 0. pseries_mach_cpu_die() is
    called via the cpu_idle() routine with preemption disabled, resulting in the
    following repeating message during rapid cpu offline/online tests
    with CONFIG_PREEMPT=y:

    BUG: scheduling while atomic: swapper/0/0x00000002
    Modules linked in: autofs4 binfmt_misc dm_mirror dm_region_hash dm_log [last unloaded: scsi_wait_scan]
    Call Trace:
    [c00000010e7079c0] [c0000000000133ec] .show_stack+0xd8/0x218 (unreliable)
    [c00000010e707aa0] [c0000000006a47f0] .dump_stack+0x28/0x3c
    [c00000010e707b20] [c00000000006e7a4] .__schedule_bug+0x7c/0x9c
    [c00000010e707bb0] [c000000000699d9c] .schedule+0x104/0x800
    [c00000010e707cd0] [c000000000015b24] .cpu_idle+0x1c4/0x1d8
    [c00000010e707d70] [c0000000006aa1b4] .start_secondary+0x398/0x3d4
    [c00000010e707e30] [c000000000008278] .start_secondary_resume+0x10/0x14

    Move the cpu_die() call inside the existing preemption enabled block of
    cpu_idle(). This is safe as the idle task is affined to a single CPU so the
    debug_smp_processor_id() tests (from cpu_should_die()) won't trigger as we are
    in a "migration disabled" region.

    Signed-off-by: Darren Hart
    Acked-by: Will Schmidt
    Cc: Thomas Gleixner
    Cc: Nathan Fontenot
    Cc: Robert Jennings
    Cc: Brian King
    Signed-off-by: Benjamin Herrenschmidt

    Signed-off-by: Darren Hart
     
  • list_for_each_entry binds its first argument to a non-null value, and thus
    any null test on the value of that argument is superfluous.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    iterator I;
    expression x,E,E1,E2;
    statement S,S1,S2;
    @@

    I(x,...) { }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Benjamin Herrenschmidt

    Julia Lawall
     
  • for_each_node_by_name binds its first argument to a non-null value, and
    thus any null test on the value of that argument is superfluous.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    iterator I;
    expression x,E;
    @@

    I(x,...) { }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Benjamin Herrenschmidt

    Julia Lawall
     
  • for_each_node_by_name only exits when its first argument is NULL, and a
    subsequent call to of_node_put on that argument is unnecessary.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    iterator name for_each_node_by_name;
    expression np,E;
    identifier l;
    @@

    for_each_node_by_name(np,...) {
    ... when != break;
    when != goto l;
    }
    ... when != np = E
    - of_node_put(np);
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Grant Likely
    Signed-off-by: Benjamin Herrenschmidt

    Julia Lawall
     
  • During kdump we run the crash handlers first then stop all other CPUs.
    We really want to stop all CPUs as close to the fail as possible and also
    have a very controlled environment for running the crash handlers, so it
    makes sense to reverse the order.

    Signed-off-by: Anton Blanchard
    Acked-by: Matt Evans
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • The code is wrapped in an #if 0, but it's wrong so we may as well fix it.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • Use is_32bit_task() helper to test 32 bit binary.

    Signed-off-by: Denis Kirjanov
    Signed-off-by: Benjamin Herrenschmidt

    Denis Kirjanov
     
  • Some modules (like eHCA) want to map all of kernel memory, for this to
    work with a relocated kernel, we need to export kernstart_addr so
    modules can use PHYSICAL_START and memstart_addr so they could use
    MEMORY_START. Note that the 32bit code already exports these symbols.

    Signed-off-By: Sonny Rao

    Signed-off-by: Benjamin Herrenschmidt

    Sonny Rao