1. 25 8月, 2015 2 次提交
    • A
      ACPI: Split out ACPI PSS from ACPI Processor driver · 239708a3
      Ashwin Chaugule 提交于
      The ACPI processor driver is currently tied too closely
      to the ACPI P-states (PSS) and other related constructs
      for controlling CPU performance.
      
      The newer ACPI specification (v5.1 onwards) introduces
      alternative methods to PSS. These new mechanisms are
      described within each ACPI Processor object and so they
      need to be scanned whenever a new Processor object is detected.
      This patch introduces a new Kconfig symbol to allow for
      finer configurability among the two options for controlling
      performance states. There is no change in functionality and
      the option is auto-selected by the architectures which support it.
      
      A future commit will introduce support for CPPC: A newer method of
      controlling CPU performance. The OS is not expected to support
      CPPC and PSS at the same time, so the Kconfig option lets us make
      the two mutually exclusive at compile time.
      Signed-off-by: NAshwin Chaugule <ashwin.chaugule@linaro.org>
      [ rjw: Changelog ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      239708a3
    • A
      PCC: Initialize PCC Mailbox earlier at boot · d3c68f21
      Ashwin Chaugule 提交于
      This change initializes the PCC Mailbox earlier than
      the ACPI processor driver. This enables drivers introduced
      in follow up patches (e.g. CPPC) to be probed via the ACPI
      processor driver interface. The CPPC probe requires the PCC
      channel to be initialized for it to query each CPUs performance
      capabilities.
      Signed-off-by: NAshwin Chaugule <ashwin.chaugule@linaro.org>
      Reviewed-by: NAl Stone <al.stone@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d3c68f21
  2. 21 7月, 2015 1 次提交
    • M
      ACPI / processor: remove leftover __refdata annotations · 8ce344c6
      Mathias Krause 提交于
      The processor_handler structure does not reference any __init / __exit
      code or data. Therefore the __refdata annotation is not needed. It used
      to be prior to commit fe7bf106 ("acpi: delete __cpuinit usage from
      all acpi files") due to the __cpuinit annotation of acpi_processor_add().
      But with that commit in place that requirement has gone.
      
      The same is true for the acpi_cpu_notifier notifier block.
      acpi_cpu_soft_notify() used to be marked __cpuinit but lost its
      annotation in the above mentioned commit as well. Therefore the __refdata
      annotation isn't needed there either.
      
      Just drop the unneded __refdata annotations to be able to catch future
      section mismatches.
      Signed-off-by: NMathias Krause <minipli@googlemail.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8ce344c6
  3. 18 7月, 2015 4 次提交
  4. 17 7月, 2015 19 次提交
  5. 16 7月, 2015 13 次提交
    • M
      dm cache: display 'needs_check' in status if it is set · 255eac20
      Mike Snitzer 提交于
      There is currently no way to see that the needs_check flag has been set
      in the metadata.  Display 'needs_check' in the cache status if it is set
      in the cache metadata.
      
      Also, update cache documentation.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      255eac20
    • M
      dm thin: display 'needs_check' in status if it is set · e4c78e21
      Mike Snitzer 提交于
      There is currently no way to see that the needs_check flag has been set
      in the metadata.  Display 'needs_check' in the thin-pool status if it is
      set in the thinp metadata.
      
      Also, update thinp documentation.
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      e4c78e21
    • M
      dm thin: stay in out-of-data-space mode once no_space_timeout expires · bcc696fa
      Mike Snitzer 提交于
      This fixes an issue where running out of data space would cause the
      thin-pool's metadata to become read-only.  There was no reason to make
      metadata read-only -- calling set_pool_mode() with PM_READ_ONLY was a
      misguided way to error all queued and future write IOs.  We can
      accomplish the same by degrading from PM_OUT_OF_DATA_SPACE to
      PM_OUT_OF_DATA_SPACE with error_if_no_space enabled.
      
      Otherwise, the use of PM_READ_ONLY could cause a race where commit() was
      started before the PM_READ_ONLY transition but dm_pool_commit_metadata()
      would go on to fail because the block manager had transitioned to
      read-only.  The return of -EPERM from dm_pool_commit_metadata(), due to
      attempting to commit while in read-only mode, caused the thin-pool to
      set 'needs_check' because a metadata_operation_failed().  This needless
      cascade of failures makes life for users more difficult than needed.
      Reported-by: NVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      bcc696fa
    • J
      scsi: fix host max depth checking for the 'queue_depth' sysfs interface · 1278dd68
      Jens Axboe 提交于
      Commit 1e6f2416 changed the scsi sysfs 'queue_depth' code to
      rejects depths higher than the scsi host template setting. But lots
      of hosts set this to 1, and update the settings in the scsi host
      when the controller/devices probing happens.
      
      This breaks (at least) mpt2sas and mpt3sas runtime setting of queue
      depth, returning EINVAL for all settings but '1'. And once it's set to
      1, there's no way to go back up.
      
      Cc: stable@vger.kernel.org
      Fixes: 1e6f2416 "scsi: don't allow setting of queue_depth bigger than can_queue"
      Signed-off-by: NJens Axboe <axboe@fb.com>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      1278dd68
    • G
      gpio: pca953x: fix nested irqs rescheduling · fdd50409
      Grygorii Strashko 提交于
      pca953x interrupt controller functionality is implemented using
      nested threaded IRQs which require parent_irq to be configured
      properly otherwise below warning can be seen if IRQ core
      will try re-schedule nested IRQ:
      
      ------------[ cut here ]------------
      WARNING: CPU: 1 PID: 12 at kernel/irq/manage.c:696 irq_nested_primary_handler+0x30/0x38()
      Primary handler called for nested irq 301
      Modules linked in: uinput ipv6 smsc95xx usbnet mii imx2_wdt etnaviv(C) matrix_keypad matrix_keymap ar1021_i2c
      CPU: 1 PID: 12 Comm: ksoftirqd/1 Tainted: G        WC    4.1.1 #9
      Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
      Backtrace:
      [<c0013298>] (dump_backtrace) from [<c0013488>] (show_stack+0x20/0x24)
      [<c0013468>] (show_stack) from [<c05743c4>] (dump_stack+0x70/0xc0)
      [<c0574354>] (dump_stack) from [<c002b7b8>] (warn_slowpath_common+0x88/0xc0)
      [<c002b730>] (warn_slowpath_common) from [<c002b8ac>] (warn_slowpath_fmt+0x40/0x48)
      [<c002b870>] (warn_slowpath_fmt) from [<c0075798>] (irq_nested_primary_handler+0x30/0x38)
      [<c0075768>] (irq_nested_primary_handler) from [<c0075200>] (handle_irq_event_percpu+0x70/0x2d0)
      [<c0075190>] (handle_irq_event_percpu) from [<c00754ac>] (handle_irq_event+0x4c/0x6c)
      [<c0075460>] (handle_irq_event) from [<c0078204>] (handle_simple_irq+0xa4/0xc8)
      [<c0078160>] (handle_simple_irq) from [<c0077cd4>] (resend_irqs+0x50/0x7c)
      [<c0077c84>] (resend_irqs) from [<c002f99c>] (tasklet_action+0x94/0x140)
      [<c002f908>] (tasklet_action) from [<c002eea8>] (__do_softirq+0xa0/0x3c8)
      [<c002ee08>] (__do_softirq) from [<c002f208>] (run_ksoftirqd+0x38/0x54)
      [<c002f1d0>] (run_ksoftirqd) from [<c004b1e4>] (smpboot_thread_fn+0x1f8/0x2f0)
      [<c004afec>] (smpboot_thread_fn) from [<c0047744>] (kthread+0xe8/0x104)
      [<c004765c>] (kthread) from [<c000fac8>] (ret_from_fork+0x14/0x2c)
      ---[ end trace 96052cda48865769 ]---
      
      The issue was reported and described in details by Lothar Waßmann and
      Christian Gmeiner in https://lkml.org/lkml/2014/9/9/123.
      
      Fix it by adding missed call of gpiochip_set_chained_irqchip()
      so GPIO IRQ chip helpers will set parent_irq for nested IRQs
      properly.
      Reported-by: NLothar Waßmann <LW@KARO-electronics.de>
      Tested-by: NChristian Gmeiner <christian.gmeiner@gmail.com>
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      fdd50409
    • S
      st: null pointer dereference panic caused by use after kref_put by st_open · e7ac6c66
      Seymour, Shane M 提交于
      Two SLES11 SP3 servers encountered similar crashes simultaneously
      following some kind of SAN/tape target issue:
      
      ...
      qla2xxx [0000:81:00.0]-801c:3: Abort command issued nexus=3:0:2 --  1 2002.
      qla2xxx [0000:81:00.0]-801c:3: Abort command issued nexus=3:0:2 --  1 2002.
      qla2xxx [0000:81:00.0]-8009:3: DEVICE RESET ISSUED nexus=3:0:2 cmd=ffff882f89c2c7c0.
      qla2xxx [0000:81:00.0]-800c:3: do_reset failed for cmd=ffff882f89c2c7c0.
      qla2xxx [0000:81:00.0]-800f:3: DEVICE RESET FAILED: Task management failed nexus=3:0:2 cmd=ffff882f89c2c7c0.
      qla2xxx [0000:81:00.0]-8009:3: TARGET RESET ISSUED nexus=3:0:2 cmd=ffff882f89c2c7c0.
      qla2xxx [0000:81:00.0]-800c:3: do_reset failed for cmd=ffff882f89c2c7c0.
      qla2xxx [0000:81:00.0]-800f:3: TARGET RESET FAILED: Task management failed nexus=3:0:2 cmd=ffff882f89c2c7c0.
      qla2xxx [0000:81:00.0]-8012:3: BUS RESET ISSUED nexus=3:0:2.
      qla2xxx [0000:81:00.0]-802b:3: BUS RESET SUCCEEDED nexus=3:0:2.
      qla2xxx [0000:81:00.0]-505f:3: Link is operational (8 Gbps).
      qla2xxx [0000:81:00.0]-8018:3: ADAPTER RESET ISSUED nexus=3:0:2.
      qla2xxx [0000:81:00.0]-00af:3: Performing ISP error recovery - ha=ffff88bf04d18000.
       rport-3:0-0: blocked FC remote port time out: removing target and saving binding
      qla2xxx [0000:81:00.0]-505f:3: Link is operational (8 Gbps).
      qla2xxx [0000:81:00.0]-8017:3: ADAPTER RESET SUCCEEDED nexus=3:0:2.
       rport-2:0-0: blocked FC remote port time out: removing target and saving binding
      sg_rq_end_io: device detached
      BUG: unable to handle kernel NULL pointer dereference at 00000000000002a8
      IP: [<ffffffff8133b268>] __pm_runtime_idle+0x28/0x90
      PGD 7e6586f067 PUD 7e5af06067 PMD 0 [1739975.390354] Oops: 0002 [#1] SMP
      CPU 0
      ...
      Supported: No, Proprietary modules are loaded [1739975.390463]
      Pid: 27965, comm: ABCD Tainted: PF           X 3.0.101-0.29-default #1 HP ProLiant DL580 Gen8
      RIP: 0010:[<ffffffff8133b268>]  [<ffffffff8133b268>] __pm_runtime_idle+0x28/0x90
      RSP: 0018:ffff8839dc1e7c68  EFLAGS: 00010202
      RAX: 0000000000000000 RBX: ffff883f0592fc00 RCX: 0000000000000090
      RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000138
      RBP: 0000000000000138 R08: 0000000000000010 R09: ffffffff81bd39d0
      R10: 00000000000009c0 R11: ffffffff81025790 R12: 0000000000000001
      R13: ffff883022212b80 R14: 0000000000000004 R15: ffff883022212b80
      FS:  00007f8e54560720(0000) GS:ffff88407f800000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 00000000000002a8 CR3: 0000007e6ced6000 CR4: 00000000001407f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process ABCD (pid: 27965, threadinfo ffff8839dc1e6000, task ffff883592e0c640)
      Stack:
       ffff883f0592fc00 00000000fffffffa 0000000000000001 ffff883022212b80
       ffff883eff772400 ffffffffa03fa309 0000000000000000 0000000000000000
       ffffffffa04003a0 ffff883f063196c0 ffff887f0379a930 ffffffff8115ea1e
      Call Trace:
       [<ffffffffa03fa309>] st_open+0x129/0x240 [st]
       [<ffffffff8115ea1e>] chrdev_open+0x13e/0x200
       [<ffffffff811588a8>] __dentry_open+0x198/0x310
       [<ffffffff81167d74>] do_last+0x1f4/0x800
       [<ffffffff81168fe9>] path_openat+0xd9/0x420
       [<ffffffff8116946c>] do_filp_open+0x4c/0xc0
       [<ffffffff8115a00f>] do_sys_open+0x17f/0x250
       [<ffffffff81468d92>] system_call_fastpath+0x16/0x1b
       [<00007f8e4f617fd0>] 0x7f8e4f617fcf
      Code: eb d3 90 48 83 ec 28 40 f6 c6 04 48 89 6c 24 08 4c 89 74 24 20 48 89 fd 48 89 1c 24 4c 89 64 24 10 41 89 f6 4c 89 6c 24 18 74 11 <f0> ff 8f 70 01 00 00 0f 94 c0 45 31 ed 84 c0 74 2b 4c 8d a5 a0
      RIP  [<ffffffff8133b268>] __pm_runtime_idle+0x28/0x90
       RSP <ffff8839dc1e7c68>
      CR2: 00000000000002a8
      
      Analysis reveals the cause of the crash to be due to STp->device
      being NULL. The pointer was NULLed via scsi_tape_put(STp) when it
      calls scsi_tape_release(). In st_open() we jump to err_out after
      scsi_block_when_processing_errors() completes and returns the
      device as offline (sdev_state was SDEV_DEL):
      
      1180 /* Open the device. Needs to take the BKL only because of incrementing the SCSI host
      1181    module count. */
      1182 static int st_open(struct inode *inode, struct file *filp)
      1183 {
      1184         int i, retval = (-EIO);
      1185         int resumed = 0;
      1186         struct scsi_tape *STp;
      1187         struct st_partstat *STps;
      1188         int dev = TAPE_NR(inode);
      1189         char *name;
      ...
      1217         if (scsi_autopm_get_device(STp->device) < 0) {
      1218                 retval = -EIO;
      1219                 goto err_out;
      1220         }
      1221         resumed = 1;
      1222         if (!scsi_block_when_processing_errors(STp->device)) {
      1223                 retval = (-ENXIO);
      1224                 goto err_out;
      1225         }
      ...
      1264  err_out:
      1265         normalize_buffer(STp->buffer);
      1266         spin_lock(&st_use_lock);
      1267         STp->in_use = 0;
      1268         spin_unlock(&st_use_lock);
      1269         scsi_tape_put(STp); <-- STp->device = 0 after this
      1270         if (resumed)
      1271                 scsi_autopm_put_device(STp->device);
      1272         return retval;
      
      The ref count for the struct scsi_tape had already been reduced
      to 1 when the .remove method of the st module had been called.
      The kref_put() in scsi_tape_put() caused scsi_tape_release()
      to be called:
      
      0266 static void scsi_tape_put(struct scsi_tape *STp)
      0267 {
      0268         struct scsi_device *sdev = STp->device;
      0269
      0270         mutex_lock(&st_ref_mutex);
      0271         kref_put(&STp->kref, scsi_tape_release); <-- calls this
      0272         scsi_device_put(sdev);
      0273         mutex_unlock(&st_ref_mutex);
      0274 }
      
      In scsi_tape_release() the struct scsi_device in the struct
      scsi_tape gets set to NULL:
      
      4273 static void scsi_tape_release(struct kref *kref)
      4274 {
      4275         struct scsi_tape *tpnt = to_scsi_tape(kref);
      4276         struct gendisk *disk = tpnt->disk;
      4277
      4278         tpnt->device = NULL; <<<---- where the dev is nulled
      4279
      4280         if (tpnt->buffer) {
      4281                 normalize_buffer(tpnt->buffer);
      4282                 kfree(tpnt->buffer->reserved_pages);
      4283                 kfree(tpnt->buffer);
      4284         }
      4285
      4286         disk->private_data = NULL;
      4287         put_disk(disk);
      4288         kfree(tpnt);
      4289         return;
      4290 }
      
      Although the problem was reported on SLES11.3 the problem appears
      in linux-next as well.
      
      The crash is fixed by reordering the code so we no longer access
      the struct scsi_tape after the kref_put() is done on it in st_open().
      Signed-off-by: NShane Seymour <shane.seymour@hp.com>
      Signed-off-by: NDarren Lavender <darren.lavender@hp.com>
      Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.com>
      Acked-by: NKai Mäkisara <kai.makisara@kolumbus.fi>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Odin.com>
      e7ac6c66
    • G
      gpio: omap: prevent module from being unloaded while in use · c23837ce
      Grygorii Strashko 提交于
      OMAP GPIO driver allowed to be built as loadable module, but it
      doesn't set owner field in GPIO chip structure. As result,
      module_get/put() API is not working and it's possible to unload
      OMAP driver while in use:
      
        omap_gpio 48051000.gpio: REMOVING GPIOCHIP WITH GPIOS STILL REQUESTED
      
      Hence, add missing configuration.
      
      Cc: Tony Lindgren <tony@atomide.com>
      Fixes: cac089f9 ('gpio: omap: Allow building as a loadable module')
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Acked-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c23837ce
    • M
      gpio: max732x: Add missing dev reference to gpiochip · 34ab54ed
      Marek Vasut 提交于
      In case the gpiochip doesn't have the .dev field set, as is the case
      in here, it is not possible to reference this device in DT as a GPIO
      controller. A good example of this problem is that gpio-leds can not
      be used when connected to this chip, the gpio-leds driver bails out
      with -EPROBE_DEFER.
      
      Fix this problem by setting the .dev field of the gpio_chip to the
      parent i2c device.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Mans Rullgard <mans@mansr.com>
      Cc: Olaf Mandel <o.mandel@menlosystems.com>
      Cc: Semen Protsenko <semen.protsenko@globallogic.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      34ab54ed
    • R
      gpio/xilinx: Use correct address when setting initial values. · 5b2c9121
      Raphaël Teysseyre 提交于
      xgpio_save_regs() is used in this driver to setup the initial
      values of the registers in the hardware.
      
      The relevant registers at that time are:
      0x0 -> channel 0 data (32 bits, one for each GPIO on this channel).
      0x4 -> channel 0 tri, controls in/out status for each GPIO of this channel.
      0x8 -> channel 1 data
      0xC -> channel 1 tri
      
      gpio-xilinx.c defines these:
      XGPIO_DATA_OFFSET   (0x0)
      XGPIO_TRI_OFFSET    (0x4)
      XGPIO_CHANNEL_OFFSET	0x8
      
      Before this patch, the "data" register value of channel 1 was written
      at 0x4 intead of 0x8 (overwriting the channel 0 "tri" register),
      and the "tri" register value for channel 1 was written at 0x8 instead of 0xC.
      Signed-off-by: NRaphaël Teysseyre <rteysseyre@gmail.com>
      Reviewed-by: NMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      5b2c9121
    • M
      gpio: zynq: Fix problem with unbalanced pm_runtime_enable · 6b956af0
      Michal Simek 提交于
      Add missing pm_runtime_disabled to remove().
      
      Error log:
      root@zynqmp:~# modprobe gpio_zynq
      root@zynqmp:~# lsmod
          Not tainted
      gpio_zynq 7086 0 - Live 0xffffffbffc00a000
      root@zynqmp:~# rmmod gpio_zynq
      root@zynqmp:~# lsmod
          Not tainted
      root@zynqmp:~# modprobe gpio_zynq
      [  246.924438] zynq-gpio ff0a0000.gpio: Unbalanced pm_runtime_enable!
      root@zynqmp:~# rmmod gpio_zynq
      root@zynqmp:~# lsmod
          Not tainted
      Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
      Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      6b956af0
    • G
      gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type · 977bd8a9
      Grygorii Strashko 提交于
      Add missed spin_unlock_irqrestore in omap_gpio_irq_type when
      omap_set_gpio_triggering() is failed.
      
      It fixes static checker warning:
      
      	drivers/gpio/gpio-omap.c:523 omap_gpio_irq_type()
      	warn: inconsistent returns 'spin_lock:&bank->lock'.
      
      This fixes commit:
      1562e461 ('gpio: omap: fix error handling in omap_gpio_irq_type')
      Reported-by: NJavier Martinez Canillas <javier@dowhile0.org>
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      977bd8a9
    • G
      gpio: brcmstb: fix null ptr dereference in driver remove · 2252607d
      Gregory Fong 提交于
      If a failure occurs during probe, brcmstb_gpio_remove() is called. In
      remove, we call platform_get_drvdata(), but at the time of failure in
      the probe the driver data hadn't yet been set which leads to a NULL
      ptr dereference in the remove's list_for_each.  Call
      platform_set_drvdata() and set up list head right after allocating the
      priv struct to both avoid the null pointer dereference that could
      occur today.  To guard against potential future changes, check for
      null pointer in remove.
      Reported-by: NTim Ross <tross@broadcom.com>
      Signed-off-by: NGregory Fong <gregory.0xf0@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      2252607d
    • K
      NVMe: Reread partitions on metadata formats · 7bee6074
      Keith Busch 提交于
      This patch has the driver automatically reread partitions if a namespace
      has a separate metadata format. Previously revalidating a disk was
      sufficient to get the correct capacity set on such formatted drives,
      but partitions that may exist would not have been surfaced.
      Reported-by: NPaul Grabinar <paul.grabinar@ranbarg.com>
      Signed-off-by: NKeith Busch <keith.busch@intel.com>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Tested-by: NPaul Grabinar <paul.grabinar@ranbarg.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      7bee6074
  6. 15 7月, 2015 1 次提交