1. 22 2月, 2012 1 次提交
    • H
      asm-generic: architecture independent readq/writeq for 32bit environment · 797a796a
      Hitoshi Mitake 提交于
      This provides unified readq()/writeq() helper functions for 32-bit
      drivers.
      
      For some cases, readq/writeq without atomicity is harmful, and order of
      io access has to be specified explicitly.  So in this patch, new two
      header files which contain non-atomic readq/writeq are added.
      
       - <asm-generic/io-64-nonatomic-lo-hi.h> provides non-atomic readq/
         writeq with the order of lower address -> higher address
      
       - <asm-generic/io-64-nonatomic-hi-lo.h> provides non-atomic readq/
         writeq with reversed order
      
      This allows us to remove some readq()s that were added drivers when the
      default non-atomic ones were removed in commit dbee8a0a ("x86:
      remove 32-bit versions of readq()/writeq()")
      
      The drivers which need readq/writeq but can do with the non-atomic ones
      must add the line:
      
        #include <asm-generic/io-64-nonatomic-lo-hi.h> /* or hi-lo.h */
      
      But this will be nop in 64-bit environments, and no other #ifdefs are
      required.  So I believe that this patch can solve the problem of
       1. driver-specific readq/writeq
       2. atomicity and order of io access
      
      This patch is tested with building allyesconfig and allmodconfig as
      ARCH=x86 and ARCH=i386 on top of tip/master.
      
      Cc: Kashyap Desai <Kashyap.Desai@lsi.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Ravi Anand <ravi.anand@qlogic.com>
      Cc: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Jason Uhlenkott <juhlenko@akamai.com>
      Cc: James Bottomley <James.Bottomley@parallels.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: James Bottomley <jbottomley@parallels.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NHitoshi Mitake <h.mitake@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      797a796a
  2. 13 1月, 2012 1 次提交
  3. 04 1月, 2012 3 次提交
  4. 22 12月, 2011 1 次提交
    • K
      driver-core: remove sysdev.h usage. · edbaa603
      Kay Sievers 提交于
      The sysdev.h file should not be needed by any in-kernel code, so remove
      the .h file from these random files that seem to still want to include
      it.
      
      The sysdev code will be going away soon, so this include needs to be
      removed no matter what.
      
      Cc: Jiandong Zheng <jdzheng@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: Daniel Walker <dwalker@fifo99.com>
      Cc: Bryan Huntsman <bryanh@codeaurora.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Wan ZongShun <mcuos.com@gmail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "Venkatesh Pallipadi
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      edbaa603
  5. 18 12月, 2011 1 次提交
  6. 15 12月, 2011 1 次提交
  7. 06 12月, 2011 1 次提交
  8. 22 11月, 2011 1 次提交
    • T
      freezer: implement and use kthread_freezable_should_stop() · 8a32c441
      Tejun Heo 提交于
      Writeback and thinkpad_acpi have been using thaw_process() to prevent
      deadlock between the freezer and kthread_stop(); unfortunately, this
      is inherently racy - nothing prevents freezing from happening between
      thaw_process() and kthread_stop().
      
      This patch implements kthread_freezable_should_stop() which enters
      refrigerator if necessary but is guaranteed to return if
      kthread_stop() is invoked.  Both thaw_process() users are converted to
      use the new function.
      
      Note that this deadlock condition exists for many of freezable
      kthreads.  They need to be converted to use the new should_stop or
      freezable workqueue.
      
      Tested with synthetic test case.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NHenrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      8a32c441
  9. 17 11月, 2011 1 次提交
  10. 09 11月, 2011 2 次提交
  11. 01 11月, 2011 6 次提交
    • É
      lis3: change exported function to use passed parameter · e1e5687d
      Éric Piel 提交于
      Change exported functions to use the device given as parameter
      instead of the global one.
      Signed-off-by: NIlkka Koskinen <ilkka.koskinen@nokia.com>
      Signed-off-by: NÉric Piel <eric.piel@tremplin-utc.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Witold Pilat <witold.pilat@gmail.com>
      Cc: Lyall Pearce <lyall.pearce@hp.com>
      Cc: Malte Starostik <m-starostik@versanet.de>
      Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e1e5687d
    • É
      hp_accel: add HP ProBook 655x · d0b6a971
      Éric Piel 提交于
      Add axis correction for HP ProBook 6555b.
      Signed-off-by: NMalte Starostik <m-starostik@versanet.de>
      Signed-off-by: NÉric Piel <eric.piel@tremplin-utc.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Witold Pilat <witold.pilat@gmail.com>
      Cc: Lyall Pearce <lyall.pearce@hp.com>
      Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com>
      Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d0b6a971
    • É
      lis3: add support for HP EliteBook 8540w · cdeaf622
      Éric Piel 提交于
      Add axis correction for HP EliteBook 8540w.
      Reported-by: NLyall Pearce <lyall.pearce@hp.com>
      Signed-off-by: NÉric Piel <eric.piel@tremplin-utc.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Witold Pilat <witold.pilat@gmail.com>
      Cc: Malte Starostik <m-starostik@versanet.de>
      Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com>
      Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cdeaf622
    • É
      lis3: add support for HP EliteBook 2730p · a17b81be
      Éric Piel 提交于
      Add axis correction for HP EliteBook 2730p.
      Tested-by: NWitold Pilat <witold.pilat@gmail.com>
      Signed-off-by: NÉric Piel <eric.piel@tremplin-utc.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Lyall Pearce <lyall.pearce@hp.com>
      Cc: Malte Starostik <m-starostik@versanet.de>
      Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com>
      Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a17b81be
    • É
      lis3lv02d: avoid divide by zero due to unchecked · 1510dd59
      Éric Piel 提交于
      After an "unexpected" reboot, I found this Oops in my logs:
      
      divide error: 0000 [#1] PREEMPT SMP=20
      CPU 0=20
      Modules linked in: lis3lv02d hp_wmi input_polldev [...]
      Pid: 390, comm: modprobe Tainted: G         C  2.6.39-rc7-wl+=20
      RIP: 0010:[<ffffffffa014b427>]  [<ffffffffa014b427>]
      		 lis3lv02d_poweron+0x4e/0x94 [lis3lv02d]
      RSP: 0018:ffff8801d6407cf8  EFLAGS: 00010246
      RAX: 0000000000000bb8 RBX: ffffffffa014e000 RCX: 0000000000000000
      RDX: 0000000000000000 RSI: ffffea00066e4708 RDI: ffff8801df002700
      RBP: ffff8801d6407d18 R08: ffffea00066c5a30 R09: ffffffff812498c9
      R10: ffff8801d7bfcea0 R11: ffff8801d7bfce10 R12: 0000000000000bb8
      R13: 00000000ffffffda R14: ffffffffa0154120 R15: ffffffffa0154030
      =46S:  00007fc0705db700(0000) GS:ffff8801dfa00000(0000) knlGS:0
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 00007f33549174f0 CR3: 00000001d65c9000 CR4: 00000000000406f0
      Process modprobe (pid: 390, threadinfo ffff8801d6406000, task ffff8801d6b40=
      000)
      Stack:
       ffffffffa0154120 62ffffffa0154030 ffffffffa014e000 00000000ffffffea
       ffff8801d6407d58 ffffffffa014bcc1 0000000000000000 0000000000000048
       ffff8801d8bae800 00000000ffffffea 00000000ffffffda ffffffffa0154120
      Call Trace:
       [<ffffffffa014bcc1>] lis3lv02d_init_device+0x1ce/0x496 [lis3lv02d]
       [<ffffffffa01522ff>] lis3lv02d_add+0x10f/0x17c [hp_accel]
       [<ffffffff81233e11>] acpi_device_probe+0x49/0x117
      [...]
      Code: 3a 75 06 80 4d ef 50 eb 04 80 4d ef 40 0f b6 55 ef be 21
      00 00 00 48 89 df ff 53 18 44 8b 63 6c e8 3e fc ff ff 89 c1 44
      89 e0 99 <f7> f9 89 c7 e8 93 82 ef e0 48 83 7b 30 00 74 2d 45
      31 e4 80 7b=20
      RIP  [<ffffffffa014b427>] lis3lv02d_poweron+0x4e/0x94 [lis3lv02d]
       RSP <ffff8801d6407cf8>
      
      >From my POV, it looks like the hardware is not working as expected
      and returns a bogus data rate. The driver doesn't check the result
      and directly uses it as some sort of divisor in some places:
      
      msleep(lis3->pwron_delay / lis3lv02d_get_odr());
      
      Under this circumstances, this could very well cause the
      "divide by zero" exception from above.
      
      For now, I fixed it the easiest and most obvious way:
      Check if the result is sane and if it isn't use a sane default
      instead. I went for "100" in the latter case, simply because
      /sys/devices/platform/lis3lv02d/rate returns it on a successful
      boot.
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NÉric Piel <eric.piel@tremplin-utc.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Cc: Witold Pilat <witold.pilat@gmail.com>
      Cc: Lyall Pearce <lyall.pearce@hp.com>
      Cc: Malte Starostik <m-starostik@versanet.de>
      Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com>
      Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1510dd59
    • P
      x86: fix up files really needing to include module.h · 7c52d551
      Paul Gortmaker 提交于
      These files aren't just exporting symbols -- they are also defining
      a MODULE_LICENSE etc. so give them the full module.h file.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      7c52d551
  12. 24 10月, 2011 21 次提交