1. 14 8月, 2013 1 次提交
  2. 13 8月, 2013 8 次提交
    • T
      PCI: msi: add default MSI operations for !HAVE_GENERIC_HARDIRQS platforms · 6a4324eb
      Thomas Petazzoni 提交于
      Some platforms (e.g S390) don't use the generic hardirqs code and
      therefore do not defined HAVE_GENERIC_HARDIRQS. This prevents using
      the irq_set_chip_data() and irq_get_chip_data() functions that are
      used for the default implementations of the MSI operations.
      
      So, when CONFIG_GENERIC_HARDIRQS is not enabled, provide another
      default implementation of the MSI operations, that simply errors
      out. The architecture is responsible for implementing those operations
      (which is the case on S390), and cannot use the msi_chip infrastructure.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      6a4324eb
    • J
      ARM: tegra: add LP1 suspend support for Tegra114 · e9f62449
      Joseph Lo 提交于
      The LP1 suspend mode will power off the CPU, clock gated the PLLs and put
      SDRAM to self-refresh mode. Any interrupt can wake up device from LP1. The
      sequence when LP1 suspending:
      
      * tunning off L1 data cache and the MMU
      * storing some EMC registers, DPD (deep power down) status, clk source of
        mselect and SCLK burst policy
      * putting SDRAM into self-refresh
      * switching CPU to CLK_M (12MHz OSC)
      * tunning off PLLM, PLLP, PLLA, PLLC and PLLX
      * switching SCLK to CLK_S (32KHz OSC)
      * shutting off the CPU rail
      
      The sequence of LP1 resuming:
      
      * re-enabling PLLM, PLLP, PLLA, PLLC and PLLX
      * restoring the clk source of mselect and SCLK burst policy
      * setting up CCLK burst policy to PLLX
      * restoring DPD status and some EMC registers
      * resuming SDRAM to normal mode
      * jumping to the "tegra_resume" from PMC_SCRATCH41
      
      Due to the SDRAM will be put into self-refresh mode, the low level
      procedures of LP1 suspending and resuming should be copied to
      TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K) when suspending. Before
      restoring the CPU context when resuming, the SDRAM needs to be switched
      back to normal mode. And the PLLs need to be re-enabled, SCLK burst policy
      be restored. Then jumping to "tegra_resume" that was expected to be stored
      in PMC_SCRATCH41 to restore CPU context and back to kernel.
      
      Based on the work by: Bo Yan <byan@nvidia.com>
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      e9f62449
    • J
      ARM: tegra: add LP1 suspend support for Tegra20 · 731a9274
      Joseph Lo 提交于
      The LP1 suspend mode will power off the CPU, clock gated the PLLs and put
      SDRAM to self-refresh mode. Any interrupt can wake up device from LP1. The
      sequence when LP1 suspending:
      
      * tunning off L1 data cache and the MMU
      * putting SDRAM into self-refresh
      * storing some EMC registers and SCLK burst policy
      * switching CPU to CLK_M (12MHz OSC)
      * switching SCLK to CLK_S (32KHz OSC)
      * tunning off PLLM, PLLP and PLLC
      * shutting off the CPU rail
      
      The sequence of LP1 resuming:
      
      * re-enabling PLLM, PLLP, and PLLC
      * restoring some EMC registers and SCLK burst policy
      * setting up CCLK burst policy to PLLP
      * resuming SDRAM to normal mode
      * jumping to the "tegra_resume" from PMC_SCRATCH41
      
      Due to the SDRAM will be put into self-refresh mode, the low level
      procedures of LP1 suspending and resuming should be copied to
      TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K) when suspending. Before
      restoring the CPU context when resuming, the SDRAM needs to be switched
      back to normal mode. And the PLLs need to be re-enabled, SCLK burst policy
      be restored, CCLK burst policy be set in PLLP. Then jumping to
      "tegra_resume" that was expected to be stored in PMC_SCRATCH41 to restore
      CPU context and back to kernel.
      
      Based on the work by:
      Colin Cross <ccross@android.com>
      Gary King <gking@nvidia.com>
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      731a9274
    • J
      ARM: tegra: add LP1 suspend support for Tegra30 · e7a932b1
      Joseph Lo 提交于
      The LP1 suspend mode will power off the CPU, clock gated the PLLs and put
      SDRAM to self-refresh mode. Any interrupt can wake up device from LP1. The
      sequence when LP1 suspending:
      
      * tunning off L1 data cache and the MMU
      * storing some EMC registers, DPD (deep power down) status, clk source of
        mselect and SCLK burst policy
      * putting SDRAM into self-refresh
      * switching CPU to CLK_M (12MHz OSC)
      * tunning off PLLM, PLLP, PLLA, PLLC and PLLX
      * switching SCLK to CLK_S (32KHz OSC)
      * shutting off the CPU rail
      
      The sequence of LP1 resuming:
      
      * re-enabling PLLM, PLLP, PLLA, PLLC and PLLX
      * restoring the clk source of mselect and SCLK burst policy
      * setting up CCLK burst policy to PLLX
      * restoring DPD status and some EMC registers
      * resuming SDRAM to normal mode
      * jumping to the "tegra_resume" from PMC_SCRATCH41
      
      Due to the SDRAM will be put into self-refresh mode, the low level
      procedures of LP1 suspending and resuming should be copied to
      TEGRA_IRAM_CODE_AREA (TEGRA_IRAM_BASE + SZ_4K) when suspending. Before
      restoring the CPU context when resuming, the SDRAM needs to be switched
      back to normal mode. And the PLLs need to be re-enabled, SCLK burst policy
      be restored, CCLK burst policy be set in PLLX. Then jumping to
      "tegra_resume" that was expected to be stored in PMC_SCRATCH41 to restore
      CPU context and back to kernel.
      
      Based on the work by: Scott Williams <scwilliams@nvidia.com>
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      e7a932b1
    • J
      ARM: tegra: add common LP1 suspend support · 95872f42
      Joseph Lo 提交于
      The LP1 suspending mode on Tegra means CPU rail off, devices and PLLs are
      clock gated and SDRAM in self-refresh mode. That means the low level LP1
      suspending and resuming code couldn't be run on DRAM and the CPU must
      switch to the always on clock domain (a.k.a. CLK_M 12MHz oscillator). And
      the system clock (SCLK) would be switched to CLK_S, a 32KHz oscillator.
      The LP1 low level handling code need to be moved to IRAM area first. And
      marking the LP1 mask for indicating the Tegra device is in LP1. The CPU
      power timer needs to be re-calculated based on 32KHz that was originally
      based on PCLK.
      
      When resuming from LP1, the LP1 reset handler will resume PLLs and then
      put DRAM to normal mode. Then jumping to the "tegra_resume" that will
      restore full context before back to kernel. The "tegra_resume" handler
      was expected to be found in PMC_SCRATCH41 register.
      
      This is common LP1 procedures for Tegra, so we do these jobs mainly in
      this patch:
      * moving LP1 low level handling code to IRAM
      * marking LP1 mask
      * copying the physical address of "tegra_resume" to PMC_SCRATCH41
      * re-calculate the CPU power timer based on 32KHz
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      [swarren, replaced IRAM_CODE macro with IO_ADDRESS(TEGRA_IRAM_CODE_AREA)]
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      95872f42
    • J
      clk: tegra114: add LP1 suspend/resume support · 0017f447
      Joseph Lo 提交于
      When the system suspends to LP1, the CPU clock source is switched to
      CLK_M (12MHz Oscillator) during suspend/resume flow. The CPU clock
      source is controlled by the CCLKG_BURST_POLICY register, and hence this
      register must be restored during LP1 resume.
      
      Cc: Mike Turquette <mturquette@linaro.org>
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      0017f447
    • J
      ARM: tegra: config the polarity of the request of sys clock · 444f9a80
      Joseph Lo 提交于
      When suspending to LP1 mode, the SYSCLK will be clock gated. And different
      board may have different polarity of the request of SYSCLK, this patch
      configure the polarity from the DT for the board.
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      444f9a80
    • J
      ARM: tegra: add common resume handling code for LP1 resuming · 5b795d05
      Joseph Lo 提交于
      Add support to the Tegra CPU reset vector to detect whether the CPU is
      resuming from LP1 suspend state. If it is, branch to the LP1-specific
      resume code.
      
      When Tegra enters the LP1 suspend state, the SDRAM controller is placed
      into a self-refresh state. For this reason, we must place the LP1 resume
      code into IRAM, so that it is accessible before SDRAM access has been
      re-enabled.
      Signed-off-by: NJoseph Lo <josephl@nvidia.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      5b795d05
  3. 12 8月, 2013 5 次提交
  4. 09 8月, 2013 1 次提交
    • S
      ARM: tegra: unify Tegra's Kconfig a bit more · 20984c44
      Stephen Warren 提交于
      Move all common select clauses from ARCH_TEGRA_*_SOC to ARCH_TEGRA to
      eliminate duplication. The USB-related selects all should have been
      common too, but were missing from Tegra114 previously. Move these to
      ARCH_TEGRA too. The latter fixes a build break when only Tegra114
      support was enabled, but not Tegra20 or Tegra30 support.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      20984c44
  5. 20 7月, 2013 13 次提交
  6. 16 7月, 2013 1 次提交
  7. 15 7月, 2013 4 次提交
    • L
      Linux 3.11-rc1 · ad81f054
      Linus Torvalds 提交于
      ad81f054
    • L
      Merge branch 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux · 54be8200
      Linus Torvalds 提交于
      Pull slab update from Pekka Enberg:
       "Highlights:
      
        - Fix for boot-time problems on some architectures due to
          init_lock_keys() not respecting kmalloc_caches boundaries
          (Christoph Lameter)
      
        - CONFIG_SLUB_CPU_PARTIAL requested by RT folks (Joonsoo Kim)
      
        - Fix for excessive slab freelist draining (Wanpeng Li)
      
        - SLUB and SLOB cleanups and fixes (various people)"
      
      I ended up editing the branch, and this avoids two commits at the end
      that were immediately reverted, and I instead just applied the oneliner
      fix in between myself.
      
      * 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux
        slub: Check for page NULL before doing the node_match check
        mm/slab: Give s_next and s_stop slab-specific names
        slob: Check for NULL pointer before calling ctor()
        slub: Make cpu partial slab support configurable
        slab: add kmalloc() to kernel API documentation
        slab: fix init_lock_keys
        slob: use DIV_ROUND_UP where possible
        slub: do not put a slab to cpu partial list when cpu_partial is 0
        mm/slub: Use node_nr_slabs and node_nr_objs in get_slabinfo
        mm/slub: Drop unnecessary nr_partials
        mm/slab: Fix /proc/slabinfo unwriteable for slab
        mm/slab: Sharing s_next and s_stop between slab and slub
        mm/slab: Fix drain freelist excessively
        slob: Rework #ifdeffery in slab.h
        mm, slab: moved kmem_cache_alloc_node comment to correct place
      54be8200
    • S
      slub: Check for page NULL before doing the node_match check · c25f195e
      Steven Rostedt 提交于
      In the -rt kernel (mrg), we hit the following dump:
      
      BUG: unable to handle kernel NULL pointer dereference at           (null)
      IP: [<ffffffff811573f1>] kmem_cache_alloc_node+0x51/0x180
      PGD a2d39067 PUD b1641067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP
      Modules linked in: sunrpc cpufreq_ondemand ipv6 tg3 joydev sg serio_raw pcspkr k8temp amd64_edac_mod edac_core i2c_piix4 e100 mii shpchp ext4 mbcache jbd2 sd_mod crc_t10dif sr_mod cdrom sata_svw ata_generic pata_acpi pata_serverworks radeon ttm drm_kms_helper drm hwmon i2c_algo_bit i2c_core dm_mirror dm_region_hash dm_log dm_mod
      CPU 3
      Pid: 20878, comm: hackbench Not tainted 3.6.11-rt25.14.el6rt.x86_64 #1 empty empty/Tyan Transport GT24-B3992
      RIP: 0010:[<ffffffff811573f1>]  [<ffffffff811573f1>] kmem_cache_alloc_node+0x51/0x180
      RSP: 0018:ffff8800a9b17d70  EFLAGS: 00010213
      RAX: 0000000000000000 RBX: 0000000001200011 RCX: ffff8800a06d8000
      RDX: 0000000004d92a03 RSI: 00000000000000d0 RDI: ffff88013b805500
      RBP: ffff8800a9b17dc0 R08: ffff88023fd14d10 R09: ffffffff81041cbd
      R10: 00007f4e3f06e9d0 R11: 0000000000000246 R12: ffff88013b805500
      R13: ffff8801ff46af40 R14: 0000000000000001 R15: 0000000000000000
      FS:  00007f4e3f06e700(0000) GS:ffff88023fd00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000000 CR3: 00000000a2d3a000 CR4: 00000000000007e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process hackbench (pid: 20878, threadinfo ffff8800a9b16000, task ffff8800a06d8000)
      Stack:
       ffff8800a9b17da0 ffffffff81202e08 ffff8800a9b17de0 000000d001200011
       0000000001200011 0000000001200011 0000000000000000 0000000000000000
       00007f4e3f06e9d0 0000000000000000 ffff8800a9b17e60 ffffffff81041cbd
      Call Trace:
       [<ffffffff81202e08>] ? current_has_perm+0x68/0x80
       [<ffffffff81041cbd>] copy_process+0xdd/0x15b0
       [<ffffffff810a2125>] ? rt_up_read+0x25/0x30
       [<ffffffff8104369a>] do_fork+0x5a/0x360
       [<ffffffff8107c66b>] ? migrate_enable+0xeb/0x220
       [<ffffffff8100b068>] sys_clone+0x28/0x30
       [<ffffffff81527423>] stub_clone+0x13/0x20
       [<ffffffff81527152>] ? system_call_fastpath+0x16/0x1b
      Code: 89 fc 89 75 cc 41 89 d6 4d 8b 04 24 65 4c 03 04 25 48 ae 00 00 49 8b 50 08 4d 8b 28 49 8b 40 10 4d 85 ed 74 12 41 83 fe ff 74 27 <48> 8b 00 48 c1 e8 3a 41 39 c6 74 1b 8b 75 cc 4c 89 c9 44 89 f2
      RIP  [<ffffffff811573f1>] kmem_cache_alloc_node+0x51/0x180
       RSP <ffff8800a9b17d70>
      CR2: 0000000000000000
      ---[ end trace 0000000000000002 ]---
      
      Now, this uses SLUB pretty much unmodified, but as it is the -rt kernel
      with CONFIG_PREEMPT_RT set, spinlocks are mutexes, although they do
      disable migration. But the SLUB code is relatively lockless, and the
      spin_locks there are raw_spin_locks (not converted to mutexes), thus I
      believe this bug can happen in mainline without -rt features. The -rt
      patch is just good at triggering mainline bugs ;-)
      
      Anyway, looking at where this crashed, it seems that the page variable
      can be NULL when passed to the node_match() function (which does not
      check if it is NULL). When this happens we get the above panic.
      
      As page is only used in slab_alloc() to check if the node matches, if
      it's NULL I'm assuming that we can say it doesn't and call the
      __slab_alloc() code. Is this a correct assumption?
      Acked-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NPekka Enberg <penberg@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c25f195e
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 41d9884c
      Linus Torvalds 提交于
      Pull more vfs stuff from Al Viro:
       "O_TMPFILE ABI changes, Oleg's fput() series, misc cleanups, including
        making simple_lookup() usable for filesystems with non-NULL s_d_op,
        which allows us to get rid of quite a bit of ugliness"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        sunrpc: now we can just set ->s_d_op
        cgroup: we can use simple_lookup() now
        efivarfs: we can use simple_lookup() now
        make simple_lookup() usable for filesystems that set ->s_d_op
        configfs: don't open-code d_alloc_name()
        __rpc_lookup_create_exclusive: pass string instead of qstr
        rpc_create_*_dir: don't bother with qstr
        llist: llist_add() can use llist_add_batch()
        llist: fix/simplify llist_add() and llist_add_batch()
        fput: turn "list_head delayed_fput_list" into llist_head
        fs/file_table.c:fput(): add comment
        Safer ABI for O_TMPFILE
      41d9884c
  8. 14 7月, 2013 7 次提交