03 Oct, 2009

2 commits

  • I was recently lucky enough to get a 64-CPU system. The processors
    actually have T-states, so my kernel log ends up with 64 lines like:

    ACPI: Processor [CPU0] (supports xx throttling states)

    This is pretty useless clutter because

    - this info is already available after boot from
    /proc/acpi/processor/CPUnn/throttling

    - there's also an ACPI_DEBUG_PRINT() in processor_throttling.c that
    gives the same info on boot for anyone who *really* cares.

    So just delete the code that prints the throttling states in
    processor_core.c.

    Signed-off-by: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Len Brown

    Roland Dreier
     
  • The ACPI /proc write() code takes an unsigned length argument like any write()
    function, but then assigned it to a *signed* integer called "len".
    Only after this is a sanity check for len done to make it not larger than 4.

    Due to the type change a len < 0 is in principle also possible; this patch
    adds a check for this.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Len Brown

    Arjan van de Ven
     

02 Oct, 2009

38 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
    Btrfs: fix data space leak fix
    Btrfs: remove duplicates of filemap_ helpers
    Btrfs: take i_mutex before generic_write_checks
    Btrfs: fix arguments to btrfs_wait_on_page_writeback_range
    Btrfs: fix deadlock with free space handling and user transactions
    Btrfs: fix error cases for ioctl transactions
    Btrfs: Use CONFIG_BTRFS_POSIX_ACL to enable ACL code
    Btrfs: introduce missing kfree
    Btrfs: Fix setting umask when POSIX ACLs are not enabled
    Btrfs: proper -ENOSPC handling

    Linus Torvalds
     
  • spi_imx_chipselect() made things that should be (and mostly are) done by
    spi_imx_setupxfer. Only setting the tx and rx functions was missing.

    Signed-off-by: Uwe Kleine-König
    Acked-by: Sascha Hauer
    Cc: David Brownell
    Cc: Guennadi Liakhovetski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • Otherwise the config function uses random data from the stack. This
    didn't stick out because config is called once more in the chipselect
    function with correct parameters.

    Signed-off-by: Uwe Kleine-König
    Acked-by: Sascha Hauer
    Cc: David Brownell
    Cc: Guennadi Liakhovetski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • spi_imx_setup() is only called by spi_setup(). The latter does the
    initialization already.

    Signed-off-by: Uwe Kleine-König
    Acked-by: Sascha Hauer
    Cc: David Brownell
    Cc: Guennadi Liakhovetski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • Signed-off-by: Sascha Hauer
    Signed-off-by: Uwe Kleine-König
    Cc: David Brownell
    Cc: Guennadi Liakhovetski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sascha Hauer
     
  • We can only setup the gpio pins in spi_setup time when we know the
    SPI_CS_HIGH setting.

    Signed-off-by: Sascha Hauer
    Signed-off-by: Uwe Kleine-König
    Cc: David Brownell
    Cc: Guennadi Liakhovetski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sascha Hauer
     
  • Signed-off-by: Sascha Hauer
    Signed-off-by: Uwe Kleine-König
    Cc: David Brownell
    Cc: Guennadi Liakhovetski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sascha Hauer
     
  • This makes the filename match the Kconfig symbol and the driver name.

    Signed-off-by: Uwe Kleine-König
    Cc: Sascha Hauer
    Cc: David Brownell
    Cc: Guennadi Liakhovetski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Uwe Kleine-König
     
  • It's just a wrapper for , so remove it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • When using %*s, sscanf should honor conversion specifiers immediately
    following the %*s. For example, the following code should find the
    position of the end of the string "hello".

    int end;
    char buf[] = "hello world";
    sscanf(buf, "%*s%n", &end);
    printf("%d\n", end);

    Ideally, sscanf would advance the fmt and str pointers the same as it
    would without the *, but the code for that is rather complicated and is
    not included in the patch.

    Signed-off-by: Andy Spencer
    Acked-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Spencer
     
  • Allow users to force skipping the TXEN test at init time. Applies
    to all serial ports. Intended for debugging only.

    There is a blacklist for devices where we need to skip the test but the
    list is not complete. This lets users force skipping the test so we can
    determine if they need to be added to the list.

    Some HP machines with weird serial consoles have this problem and there
    may be more.

    Signed-off-by: Chuck Ebbert
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Ebbert
     
  • Check whether index is within bounds before grabbing the element.

    Also, since NR_PORTS is defined ARRAY_SIZE(cy_port), cy_port[NR_PORTS] is
    out of bounds as well.

    [akpm@linux-foundation.org: cleanup, remove (long) casts]
    Signed-off-by: Roel Kluin
    Cc: Alan Cox
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin
     
  • irq is declared with size NR_CARDS (4), but the loop containing this
    segment runs up until NR_ISA_ADDRS (16), possibly reading from irq[i] (and
    trying to use the result)

    Identified by the Parfait static scanner.

    Signed-off-by: Roel Kluin
    Acked-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin
     
  • Convert spaces to tabs and remove wrong spaces

    Signed-off-by: Breno Leitao
    Cc: Scott Kilau
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Breno Leitao
     
  • Signed-off-by: Atsushi Nemoto
    Cc: Ralf Baechle
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Nemoto
     
  • Add better support for omitting either the card detect or the write
    protect GPIOs if the board does not support it. Add the fields
    no_wprotect and no_detect to the platform data which when set indicate the
    absence of the respective GPIOs.

    Note, this also fixes a minor bug where it tries to free IRQ0 if there is
    no detect gpio available.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • We have found a couple of boards where the SDIO IRQ hardware support has
    failed to work properly, and thus we should make it configurable whether
    or not to be included in the driver.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Fixes for the DMA transfer mode of the driver to try and improve the state
    of the code:

    - Ensure that dma_complete is set during the end of the command phase
    so that transfers do not stall awaiting the completion

    - Update the DMA debugging to provide a bit more useful information
    such as how many DMA descriptors where not processed and print the
    DMA addresses in hexadecimal.

    - Fix the DMA channel request code to actually request DMA for the
    S3CMCI block instead of whatever '0' signified.

    - Add fallback to PIO if we cannot get the DMA channel, as many of the
    devices with this block only have a limited number of DMA channels.

    - Only try and claim and free the DMA channel if we are trying to use it.

    This improves the driver DMA code to the point where it can now identify a
    card and read the partition table. However the DMA can still stall when
    trying to move data between the host and memory.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Add a selection for the data transfer mode of the s3cmci driver, allowing
    for either a configuration or rumtime selection of the use of the DMA or
    PIO transfer code.

    The PIO only mode is 476 bytes smaller than the driver with both methods
    compiled in.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • The controller supports SDIO IRQ detection so add support for hardware
    assisted SDIO interrupt detection for the SDIO core. This improves the
    response time for SDIO interrupts and thus the transfer rate from devices
    such as the Marvel 8686.

    As a note, it does seem that the controller will miss an IRQ than is held
    asserted, so there are some manual checks to see if the SDIO interrupt is
    active after a transfer.

    Major testing on the S3C2440.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Export driver state and hardware register state via debugfs entries
    created under a directory formed from dev_name() on the probed device when
    CONFIG_DEBUG_FS is set.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • The clear_imask() call should be used to clear the interrupt mask
    register, as it may end up clearing the SDIO interrupt bit if this is
    enabled.

    Change all writes of zero to SDIIMSK register to use clear_imask() ready
    for the SDIO updates.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Move to using dev_pm_ops for suspend and resume.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Move to using gpiolib to access the card detect and write protect GPIO
    lines instead of using the platform speicifc s3c2410_gpio calls.

    Also ensure that the card lines are claimed the same way to avoid overlap
    with any other drivers.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Use the platform id list to match the three different versions of the
    hardware block that this driver supports.

    This will change the prefix of the console messages produced by this
    driver to be prefixed by s3c-mci instead of the hardware block name, such
    as s3c2440-mci.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • Replace the local definition RESSIZE() with the standard resource_size()
    call for getting the size of a struct resource.

    Signed-off-by: Ben Dooks
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • In charge/uncharge/reclaim path, usage_in_excess is calculated repeatedly
    and it takes res_counter's spin_lock every time.

    This patch removes unnecessary calls for res_count_soft_limit_excess.

    Reviewed-by: Daisuke Nishimura
    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Paul Menage
    Cc: Li Zefan
    Cc: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • This patch clean up/fixes for memcg's uncharge soft limit path.

    Problems:
    Now, res_counter_charge()/uncharge() handles softlimit information at
    charge/uncharge and softlimit-check is done when event counter per memcg
    goes over limit. Now, event counter per memcg is updated only when
    memory usage is over soft limit. Here, considering hierarchical memcg
    management, ancesotors should be taken care of.

    Now, ancerstors(hierarchy) are handled in charge() but not in uncharge().
    This is not good.

    Prolems:
    1. memcg's event counter incremented only when softlimit hits. That's bad.
    It makes event counter hard to be reused for other purpose.

    2. At uncharge, only the lowest level rescounter is handled. This is bug.
    Because ancesotor's event counter is not incremented, children should
    take care of them.

    3. res_counter_uncharge()'s 3rd argument is NULL in most case.
    ops under res_counter->lock should be small. No "if" sentense is better.

    Fixes:
    * Removed soft_limit_xx poitner and checks in charge and uncharge.
    Do-check-only-when-necessary scheme works enough well without them.

    * make event-counter of memcg incremented at every charge/uncharge.
    (per-cpu area will be accessed soon anyway)

    * All ancestors are checked at soft-limit-check. This is necessary because
    ancesotor's event counter may never be modified. Then, they should be
    checked at the same time.

    Reviewed-by: Daisuke Nishimura
    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Paul Menage
    Cc: Li Zefan
    Cc: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • __css_put() doesn't check a bug as refcnt goes to minus.
    I think it should be caught. This patch adds a check for it.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Paul Menage
    Cc: Li Zefan
    Cc: Balbir Singh
    Cc: Daisuke Nishimura
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • __mem_cgroup_largest_soft_limit_node() returns a mem_cgroup_per_zone "mz"
    with incremnted mz->mem->css's refcnt. Then, the caller of this function
    has to call css_put(mz->mem->css).

    But, mz can be !NULL even if "not found" i.e. without css_get(). By
    this, css->refcnt will go down to minus.

    This may cause various things...one of results will be
    initite-loop in css_tryget() as this.

    INFO: RCU detected CPU 0 stall (t=10000 jiffies)
    sending NMI to all CPUs:
    NMI backtrace for cpu 0
    CPU 0:

    <> [] trace_hardirqs_off+0xd/0x10
    [] flat_send_IPI_mask+0x90/0xb0
    [] flat_send_IPI_all+0x69/0x70
    [] arch_trigger_all_cpu_backtrace+0x62/0xa0
    [] __rcu_pending+0x7e/0x370
    [] rcu_check_callbacks+0x47/0x130
    [] update_process_times+0x46/0x70
    [] tick_sched_timer+0x60/0x160
    [] ? tick_sched_timer+0x0/0x160
    [] __run_hrtimer+0xba/0x150
    [] hrtimer_interrupt+0xd5/0x1b0
    [] ? trace_hardirqs_off_thunk+0x3a/0x3c
    [] smp_apic_timer_interrupt+0x6d/0x9b
    [] apic_timer_interrupt+0x13/0x20
    [] ? mem_cgroup_walk_tree+0x156/0x180
    [] ? mem_cgroup_walk_tree+0x73/0x180
    [] ? mem_cgroup_walk_tree+0x32/0x180
    [] ? mem_cgroup_get_local_stat+0x0/0x110
    [] ? mem_control_stat_show+0x14b/0x330
    [] ? cgroup_seqfile_show+0x3d/0x60

    Above shows CPU0 caught in css_tryget()'s inifinite loop because
    of bad refcnt.

    This is a fix to set mz=NULL at the top of retry path.

    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: Paul Menage
    Cc: Li Zefan
    Cc: Balbir Singh
    Cc: Daisuke Nishimura
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Some configurations of the Timberdale FPGA has the uartlite
    included.

    Signed-off-by: Richard Röjfors
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Röjfors
     
  • This patch size comment is like so last millenium. Update it to modern
    times.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Some manufacturers provide vendor information in non-vendor specific CIS
    tuples. For example, Broadcom uses an Extended Function tuple to provide
    the MAC address on some of their network cards, as in the case of the
    Nintendo Wii WLAN daughter card.

    This patch allows passing whitelisted FUNCE tuples unknown to the SDIO
    core to a matching SDIO driver instead of rejecting them and failing.

    Signed-off-by: Albert Herranz
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Albert Herranz
     
  • The page_address_in_vma() is not only used in unuse_vma().

    Signed-off-by: Huang Shijie
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Shijie
     
  • Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a
    memory clobber, as it is only passed the address of the buffer, not a
    memory reference to the buffer itself.

    This caused failures in Hurd's pfinetv4 when we tried to compile it with
    gcc-4.3 (bogus checksums).

    Signed-off-by: Samuel Thibault
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Acked-by: "David S. Miller"
    Cc: Andi Kleen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Samuel Thibault
     
  • Fix some build failures when using gcc-4.x for MN10300.

    Firstly, __get_user() fails to build because the pointer points to a const and
    __gu_val ends up being read-only:

    In file included from include/linux/mempolicy.h:62,
    from init/main.c:50:
    include/linux/pagemap.h: In function 'fault_in_pages_readable':
    include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
    include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
    make[1]: *** [init/main.o] Error 1

    Secondly, gcc-4 doesn't allow casts of lvalues:

    UPD include/linux/compile.h
    arch/mn10300/kernel/rtc.c: In function 'calibrate_clock':
    arch/mn10300/kernel/rtc.c:170: error: lvalue required as left operand of assignment
    arch/mn10300/kernel/rtc.c:172: error: lvalue required as left operand of assignment
    make[1]: *** [arch/mn10300/kernel/rtc.o] Error 1

    These are seen with gcc 4.2.1.

    Signed-off-by: Mark Salter
    Signed-off-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Salter
     
  • Signed-off-by: Joe Perches
    Acked-by: Marek Vasut
    Acked-by: Tomas Cech
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • Stanse found (again) a BKL imbalance in vt_ioctl.

    It's easily triggerable by ioctl(dev_tty_fd, VT_SETACTIVATE, NULL);

    Introduced by

    commit d3b5cffcf84a8bdc7073dce4745d67c72629af85 Author: Alan Cox
    Date: Sat Sep 19 13:13:26 2009 -0700

    vt: add an activate and lock

    Signed-off-by: Jiri Slaby
    Cc: Alan Cox
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby