1. 15 4月, 2015 5 次提交
  2. 10 4月, 2015 1 次提交
  3. 09 4月, 2015 6 次提交
    • A
      jump_label: Allow jump labels to be used in assembly · c0ccf6f9
      Anton Blanchard 提交于
      To use jump labels in assembly we need the HAVE_JUMP_LABEL
      define, so we select a fallback version if the toolchain does
      not support them.
      
      Modify linux/jump_label.h so it can be included by assembly
      files. We also need to add -DCC_HAVE_ASM_GOTO to KBUILD_AFLAGS.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: benh@kernel.crashing.org
      Cc: catalin.marinas@arm.com
      Cc: davem@davemloft.net
      Cc: heiko.carstens@de.ibm.com
      Cc: jbaron@akamai.com
      Cc: linux@arm.linux.org.uk
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: liuj97@gmail.com
      Cc: mgorman@suse.de
      Cc: mmarek@suse.cz
      Cc: mpe@ellerman.id.au
      Cc: paulus@samba.org
      Cc: ralf@linux-mips.org
      Cc: rostedt@goodmis.org
      Cc: schwidefsky@de.ibm.com
      Cc: will.deacon@arm.com
      Link: http://lkml.kernel.org/r/1428551492-21977-2-git-send-email-anton@samba.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      c0ccf6f9
    • B
      mmc: dw_mmc: fix fifo ordering in big endian · 76184ac1
      Ben Dooks 提交于
      The dw_mmc driver changes to make the IO accesors endian agnostic did not
      take into account the fifo accesses do not need to be swapped. To fix this
      add a mmci_fifo_read/write wrapper to allow these to be passed through the
      IO without being swapped.
      
      Since these are now specific functions, it would be easier just to store
      the pointer to the fifo registers in the host block instead of the offset
      to them. So change the host->data_offset to host->fifo_reg (which also
      means we catch all the places this is read or written).
      Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      76184ac1
    • M
      genirq: Allow the irqchip state of an IRQ to be save/restored · 1b7047ed
      Marc Zyngier 提交于
      There is a number of cases where a kernel subsystem may want to
      introspect the state of an interrupt at the irqchip level:
      
      - When a peripheral is shared between virtual machines,
        its interrupt state becomes part of the guest's state,
        and must be switched accordingly. KVM on arm/arm64 requires
        this for its guest-visible timer
      - Some GPIO controllers seem to require peeking into the
        interrupt controller they are connected to to report
        their internal state
      
      This seem to be a pattern that is common enough for the core code
      to try and support this without too many horrible hacks. Introduce
      a pair of accessors (irq_get_irqchip_state/irq_set_irqchip_state)
      to retrieve the bits that can be of interest to another subsystem:
      pending, active, and masked.
      
      - irq_get_irqchip_state returns the state of the interrupt according
        to a parameter set to IRQCHIP_STATE_PENDING, IRQCHIP_STATE_ACTIVE,
        IRQCHIP_STATE_MASKED or IRQCHIP_STATE_LINE_LEVEL.
      - irq_set_irqchip_state similarly sets the state of the interrupt.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
      Tested-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Phong Vo <pvo@apm.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Tin Huynh <tnhuynh@apm.com>
      Cc: Y Vo <yvo@apm.com>
      Cc: Toan Le <toanle@apm.com>
      Cc: Bjorn Andersson <bjorn@kryo.se>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Link: http://lkml.kernel.org/r/1426676484-21812-2-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      1b7047ed
    • A
      PCI/ACPI: Optimize device state transition delays · e33caa82
      Aaron Lu 提交于
      The PCI "ACPI additions for FW latency optimizations" ECN (link below)
      defines two functions in the PCI _DSM:
      
        Function 8, "Reset Delay," applies to the entire hierarchy below a PCI
        host bridge.  If it returns one, the OS may assume that all devices in
        the hierarchy have already completed power-on reset delays.
      
        Function 9, "Device Readiness Durations," applies only to the object
        where it is located.  It returns delay durations required after various
        events if the device requires less time than the spec requires.  Delays
        from this function take precedence over the Reset Delay function.
      
      Add support for Reset Delay and part of Device Readiness Durations.
      
      [bhelgaas: changelog, comments]
      Link: https://www.pcisig.com/specifications/conventional/pci_firmware/ECN_fw_latency_optimization_final.pdfSigned-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      e33caa82
    • A
      PCI: Make a shareable UUID for PCI firmware ACPI _DSM · 18e94a33
      Aaron Lu 提交于
      The PCI Firmware Specification, r3.0, sec 4.6.4.1.3, defines a single UUID
      for an ACPI _DSM method to provide device-specific control functions.  This
      _DSM method support several functions, including PCI Express Slot
      Information, PCI Express Slot Number, PCI Bus Capabilities, etc.
      
      Move the UUID definition from pci/pci-label.c, where it could be used only
      for one function, to pci/pci-acpi.c where it can be shared for all these
      functions.
      
      [bhelgaas: changelog]
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      18e94a33
    • B
      Defer processing of REQ_PREEMPT requests for blocked devices · bba0bdd7
      Bart Van Assche 提交于
      SCSI transport drivers and SCSI LLDs block a SCSI device if the
      transport layer is not operational. This means that in this state
      no requests should be processed, even if the REQ_PREEMPT flag has
      been set. This patch avoids that a rescan shortly after a cable
      pull sporadically triggers the following kernel oops:
      
      BUG: unable to handle kernel paging request at ffffc9001a6bc084
      IP: [<ffffffffa04e08f2>] mlx4_ib_post_send+0xd2/0xb30 [mlx4_ib]
      Process rescan-scsi-bus (pid: 9241, threadinfo ffff88053484a000, task ffff880534aae100)
      Call Trace:
       [<ffffffffa0718135>] srp_post_send+0x65/0x70 [ib_srp]
       [<ffffffffa071b9df>] srp_queuecommand+0x1cf/0x3e0 [ib_srp]
       [<ffffffffa0001ff1>] scsi_dispatch_cmd+0x101/0x280 [scsi_mod]
       [<ffffffffa0009ad1>] scsi_request_fn+0x411/0x4d0 [scsi_mod]
       [<ffffffff81223b37>] __blk_run_queue+0x27/0x30
       [<ffffffff8122a8d2>] blk_execute_rq_nowait+0x82/0x110
       [<ffffffff8122a9c2>] blk_execute_rq+0x62/0xf0
       [<ffffffffa000b0e8>] scsi_execute+0xe8/0x190 [scsi_mod]
       [<ffffffffa000b2f3>] scsi_execute_req+0xa3/0x130 [scsi_mod]
       [<ffffffffa000c1aa>] scsi_probe_lun+0x17a/0x450 [scsi_mod]
       [<ffffffffa000ce86>] scsi_probe_and_add_lun+0x156/0x480 [scsi_mod]
       [<ffffffffa000dc2f>] __scsi_scan_target+0xdf/0x1f0 [scsi_mod]
       [<ffffffffa000dfa3>] scsi_scan_host_selected+0x183/0x1c0 [scsi_mod]
       [<ffffffffa000edfb>] scsi_scan+0xdb/0xe0 [scsi_mod]
       [<ffffffffa000ee13>] store_scan+0x13/0x20 [scsi_mod]
       [<ffffffff811c8d9b>] sysfs_write_file+0xcb/0x160
       [<ffffffff811589de>] vfs_write+0xce/0x140
       [<ffffffff81158b53>] sys_write+0x53/0xa0
       [<ffffffff81464592>] system_call_fastpath+0x16/0x1b
       [<00007f611c9d9300>] 0x7f611c9d92ff
      Reported-by: NMax Gurtuvoy <maxg@mellanox.com>
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      bba0bdd7
  4. 08 4月, 2015 6 次提交
    • U
      mmc: core: Convert the error field in struct mmc_command|data into an int · f5c5179b
      Ulf Hansson 提交于
      Everybody expects the error field in the struct mmc_command|data to be
      and int but it's actually an unsigned int. Let's convert it into an int
      to meet the expectations.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      f5c5179b
    • N
      KVM: x86: BSP in MSR_IA32_APICBASE is writable · 58d269d8
      Nadav Amit 提交于
      After reset, the CPU can change the BSP, which will be used upon INIT.  Reset
      should return the BSP which QEMU asked for, and therefore handled accordingly.
      
      To quote: "If the MP protocol has completed and a BSP is chosen, subsequent
      INITs (either to a specific processor or system wide) do not cause the MP
      protocol to be repeated."
      [Intel SDM 8.4.2: MP Initialization Protocol Requirements and Restrictions]
      Signed-off-by: NNadav Amit <namit@cs.technion.ac.il>
      Message-Id: <1427933438-12782-3-git-send-email-namit@cs.technion.ac.il>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      58d269d8
    • M
      include/linux/dmapool.h: declare struct device · ce66b032
      Mark Brown 提交于
      dmapool uses struct device in function arguments but relies on an
      implicit inclusion to declare struct device causing warnings in some
      configurations:
      
        include/linux/dmapool.h:31:7: warning: 'struct device' declared inside parameter list
      
      Fix this by adding a struct device declaration to the file.
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ce66b032
    • M
      mm: move zone lock to a different cache line than order-0 free page lists · a368ab67
      Mel Gorman 提交于
      Huang Ying reported the following problem due to commit 3484b2de ("mm:
      rearrange zone fields into read-only, page alloc, statistics and page
      reclaim lines") from the Intel performance tests
      
          24b7e581  3484b2de
          ----------------  --------------------------
                   %stddev     %change         %stddev
                       \          |                \
              152288 \261  0%     -46.2%      81911 \261  0%  aim7.jobs-per-min
                 237 \261  0%     +85.6%        440 \261  0%  aim7.time.elapsed_time
                 237 \261  0%     +85.6%        440 \261  0%  aim7.time.elapsed_time.max
               25026 \261  0%     +70.7%      42712 \261  0%  aim7.time.system_time
             2186645 \261  5%     +32.0%    2885949 \261  4%  aim7.time.voluntary_context_switches
             4576561 \261  1%     +24.9%    5715773 \261  0%  aim7.time.involuntary_context_switches
      
      The problem is specific to very large machines under stress.  It was not
      reproducible with the machines I had used to justify the original patch
      because large numbers of CPUs are required.  When pressure is high enough,
      the cache line is bouncing between CPUs trying to acquire the lock and the
      holder of the lock adjusting free lists.  The intention was that the
      acquirer of the lock would automatically have the cache line holding the
      free lists but according to Huang, this is not a universal win.
      
      One possibility is to move the zone lock to its own cache line but it
      increases the size of the zone.  This patch moves the lock to the other
      end of the free lists where they do not contend under high pressure.  It
      does mean the page allocator paths now require more cache lines but Huang
      reports that it restores performance to previous levels on large machines
      
                   %stddev     %change         %stddev
                       \          |                \
               84568 \261  1%     +94.3%     164280 \261  1%  aim7.jobs-per-min
             2881944 \261  2%     -35.1%    1870386 \261  8%  aim7.time.voluntary_context_switches
                 681 \261  1%      -3.4%        658 \261  0%  aim7.time.user_time
             5538139 \261  0%     -12.1%    4867884 \261  0%  aim7.time.involuntary_context_switches
               44174 \261  1%     -46.0%      23848 \261  1%  aim7.time.system_time
                 426 \261  1%     -48.4%        219 \261  1%  aim7.time.elapsed_time
                 426 \261  1%     -48.4%        219 \261  1%  aim7.time.elapsed_time.max
                 468 \261  1%     -43.1%        266 \261  2%  uptime.boot
      Signed-off-by: NMel Gorman <mgorman@suse.de>
      Reported-by: NHuang Ying <ying.huang@intel.com>
      Tested-by: NHuang Ying <ying.huang@intel.com>
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a368ab67
    • G
      spi: Make master->handle_err() callback optional to avoid crashes · ff61eb42
      Geert Uytterhoeven 提交于
      If a driver doesn't implement the master->handle_err() callback and an
      SPI transfer fails, the kernel will crash with a NULL pointer
      dereference:
      
          Unable to handle kernel NULL pointer dereference at virtual address 00000000
          pgd = c0003000
          [00000000] *pgd=80000040004003, *pmd=00000000
          Internal error: Oops: 80000206 [#1] SMP ARM
          Modules linked in:
          CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.0.0-rc7-koelsch-05861-g1fc9fdd4add4f783 #1046
          Hardware name: Generic R8A7791 (Flattened Device Tree)
          task: eec359c0 ti: eec54000 task.ti: eec54000
          PC is at 0x0
          LR is at spi_transfer_one_message+0x1cc/0x1f0
      
      Make the master->handle_err() callback optional to avoid the crash.
      
      Also fix a spelling mistake in the callback documentation while we're at
      it.
      
      Fixes: b716c4ff ("spi: introduce master->handle_err() callback")
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      ff61eb42
    • F
      usb: define a generic USB_RESUME_TIMEOUT macro · 62f0342d
      Felipe Balbi 提交于
      Every USB Host controller should use this new
      macro to define for how long resume signalling
      should be driven on the bus.
      
      Currently, almost every single USB controller
      is using a 20ms timeout for resume signalling.
      
      That's problematic for two reasons:
      
      a) sometimes that 20ms timer expires a little
      before 20ms, which makes us fail certification
      
      b) some (many) devices actually need more than
      20ms resume signalling.
      
      Sure, in case of (b) we can state that the device
      is against the USB spec, but the fact is that
      we have no control over which device the certification
      lab will use. We also have no control over which host
      they will use. Most likely they'll be using a Windows
      PC which, again, we have no control over how that
      USB stack is written and how long resume signalling
      they are using.
      
      At the end of the day, we must make sure Linux passes
      electrical compliance when working as Host or as Device
      and currently we don't pass compliance as host because
      we're driving resume signallig for exactly 20ms and
      that confuses certification test setup resulting in
      Certification failure.
      
      Cc: <stable@vger.kernel.org> # v3.10+
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      62f0342d
  5. 07 4月, 2015 2 次提交
    • A
      fix mremap() vs. ioctx_kill() race · b2edffdd
      Al Viro 提交于
      teach ->mremap() method to return an error and have it fail for
      aio mappings in process of being killed
      
      Note that in case of ->mremap() failure we need to undo move_page_tables()
      we'd already done; we could call ->mremap() first, but then the failure of
      move_page_tables() would require undoing whatever _successful_ ->mremap()
      has done, which would be a lot more headache in general.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      b2edffdd
    • H
      ipv6: protect skb->sk accesses from recursive dereference inside the stack · f60e5990
      hannes@stressinduktion.org 提交于
      We should not consult skb->sk for output decisions in xmit recursion
      levels > 0 in the stack. Otherwise local socket settings could influence
      the result of e.g. tunnel encapsulation process.
      
      ipv6 does not conform with this in three places:
      
      1) ip6_fragment: we do consult ipv6_npinfo for frag_size
      
      2) sk_mc_loop in ipv6 uses skb->sk and checks if we should
         loop the packet back to the local socket
      
      3) ip6_skb_dst_mtu could query the settings from the user socket and
         force a wrong MTU
      
      Furthermore:
      In sk_mc_loop we could potentially land in WARN_ON(1) if we use a
      PF_PACKET socket ontop of an IPv6-backed vxlan device.
      
      Reuse xmit_recursion as we are currently only interested in protecting
      tunnel devices.
      
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f60e5990
  6. 06 4月, 2015 1 次提交
  7. 03 4月, 2015 13 次提交
  8. 02 4月, 2015 3 次提交
  9. 01 4月, 2015 3 次提交