1. 24 6月, 2009 3 次提交
  2. 23 6月, 2009 7 次提交
  3. 22 6月, 2009 1 次提交
  4. 20 6月, 2009 4 次提交
  5. 19 6月, 2009 25 次提交
    • A
      rfkill: export persistent attribute in sysfs · 464902e8
      Alan Jenkins 提交于
      This information allows userspace to implement a hybrid policy where
      it can store the rfkill soft-blocked state in platform non-volatile
      storage if available, and if not then file-based storage can be used.
      
      Some users prefer platform non-volatile storage because of the behaviour
      when dual-booting multiple versions of Linux, or if the rfkill setting
      is changed in the BIOS setting screens, or if the BIOS responds to
      wireless-toggle hotkeys itself before the relevant platform driver has
      been loaded.
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      464902e8
    • A
      rfkill: don't restore software blocked state on persistent devices · 06d5caf4
      Alan Jenkins 提交于
      The setting of the "persistent" flag is also made more explicit using
      a new rfkill_init_sw_state() function, instead of special-casing
      rfkill_set_sw_state() when it is called before registration.
      
      Suspend is a bit of a corner case so we try to get away without adding
      another hack to rfkill-input - it's going to be removed soon.
      If the state does change over suspend, users will simply have to prod
      rfkill-input twice in order to toggle the state.
      
      Userspace policy agents will be able to implement a more consistent user
      experience.  For example, they can avoid the above problem if they
      toggle devices individually.  Then there would be no "global state"
      to get out of sync.
      
      Currently there are only two rfkill drivers with persistent soft-blocked
      state.  thinkpad-acpi already checks the software state on resume.
      eeepc-laptop will require modification.
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      CC: Marcel Holtmann <marcel@holtmann.org>
      Acked-by: NHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      06d5caf4
    • H
      i2c: New macro to initialize i2c address lists on the fly · c7036673
      Hans Verkuil 提交于
      For video4linux we sometimes need to probe for a single i2c address.
      Normally you would do it like this:
      
      static const unsigned short addrs[] = {
      	addr, I2C_CLIENT_END
      };
      
      client = i2c_new_probed_device(adapter, &info, addrs);
      
      This is a bit awkward and I came up with this macro:
      
      #define V4L2_I2C_ADDRS(addr, addrs...) \
      	((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END })
      
      This can construct a list of one or more i2c addresses on the fly. But
      this is something that really belongs in i2c.h, renamed to I2C_ADDRS.
      
      With this macro we can just do:
      
      client = i2c_new_probed_device(adapter, &info, I2C_ADDRS(addr));
      
      Note that this can also be used to initialize an array:
      
      static const unsigned short addrs[] = I2C_ADDRS(0x2a, 0x2c);
      
      Whether you want to is another matter, but it works. This functionality is 
      also available in the oldest supported gcc (3.2).
      Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      c7036673
    • J
      i2c: Don't advertise i2c functions when not available · 23af8400
      Jean Delvare 提交于
      Surround i2c function declarations with ifdefs, so that they aren't
      advertised when i2c-core isn't actually built. That way, drivers using
      these functions unconditionally will result in an immediate build
      failure, rather than a late linking failure which is harder to figure
      out.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      23af8400
    • J
      i2c: Add a sysfs interface to instantiate devices · 99cd8e25
      Jean Delvare 提交于
      Add a sysfs interface to instantiate and delete I2C devices. This is
      primarily a replacement of the force_* module parameters implemented
      by some i2c drivers. These module parameters were implemented
      internally by the I2C_CLIENT_INSMOD* macros, which don't scale well.
      
      This can also be used when developing a driver on a self-soldered
      board which doesn't yet have proper I2C device declaration at the
      platform level, and presumably for various debugging situations.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      99cd8e25
    • J
      i2c: Kill the redundant client list · e549c2b5
      Jean Delvare 提交于
      We used to maintain our own per-adapter list of i2c clients, but this
      is redundant with what the driver core does, and no longer needed.
      Just drop the redundant list.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      e549c2b5
    • J
      i2c: Kill is_newstyle_driver · 1e40ac12
      Jean Delvare 提交于
      Legacy i2c drivers are gone, all drivers are new-style now, so there
      is no point to check.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      1e40ac12
    • J
      i2c: Drop i2c_probe function · 36789b5e
      Jean Delvare 提交于
      The legacy i2c_probe() function has no users left, get rid of it.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      36789b5e
    • J
      i2c: Get rid of the legacy binding model · 729d6dd5
      Jean Delvare 提交于
      We converted all the legacy i2c drivers so we can finally get rid of
      the legacy binding model. Hooray!
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      729d6dd5
    • J
      i2c: Kill client_register and client_unregister methods · 352da982
      Jean Delvare 提交于
      These methods were useful in the legacy binding model but no longer in
      the new (standard) binding model. There are no users left so we can
      drop them.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      352da982
    • P
      perf_counter: Simplify and fix task migration counting · e5289d4a
      Peter Zijlstra 提交于
      The task migrations counter was causing rare and hard to decypher
      memory corruptions under load. After a day of debugging and bisection
      we found that the problem was introduced with:
      
        3f731ca6: perf_counter: Fix cpu migration counter
      
      Turning them off fixes the crashes. Incidentally, the whole
      perf_counter_task_migration() logic can be done simpler as well,
      by injecting a proper sw-counter event.
      
      This cleanup also fixed the crashes. The precise failure mode is
      not completely clear yet, but we are clearly not unhappy about
      having a fix ;-)
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e5289d4a
    • P
      perf_counter: Make callchain samples extensible · f9188e02
      Peter Zijlstra 提交于
      Before exposing upstream tools to a callchain-samples ABI, tidy it
      up to make it more extensible in the future:
      
      Use markers in the IP chain to denote context, use (u64)-1..-4095 range
      for these context markers because we use them for ERR_PTR(), so these
      addresses are unlikely to be mapped.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f9188e02
    • B
      block: rename CONFIG_LBD to CONFIG_LBDAF · 90c699a9
      Bartlomiej Zolnierkiewicz 提交于
      Follow-up to "block: enable by default support for large devices
      and files on 32-bit archs".
      
      Rename CONFIG_LBD to CONFIG_LBDAF to:
      - allow update of existing [def]configs for "default y" change
      - reflect that it is used also for large files support nowadays
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      90c699a9
    • A
      nfsd41: Backchannel: minorversion support for the back channel · ab52ae6d
      Andy Adamson 提交于
      Prepare to share backchannel code with NFSv4.1.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NRicardo Labiaga <Ricardo.Labiaga@netapp.com>
      [nfsd41: use nfsd4_cb_sequence for callback minorversion]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      ab52ae6d
    • D
      agp: switch AGP to use page array instead of unsigned long array · 07613ba2
      Dave Airlie 提交于
      This switches AGP to use an array of pages for tracking the
      pages allocated to the GART. This should enable GEM on PAE to work
      a lot better as we can pass highmem pages to the PAT code and it will
      do the right thing with them.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      07613ba2
    • S
      function-graph: add stack frame test · 71e308a2
      Steven Rostedt 提交于
      In case gcc does something funny with the stack frames, or the return
      from function code, we would like to detect that.
      
      An arch may implement passing of a variable that is unique to the
      function and can be saved on entering a function and can be tested
      when exiting the function. Usually the frame pointer can be used for
      this purpose.
      
      This patch also implements this for x86. Where it passes in the stack
      frame of the parent function, and will test that frame on exit.
      
      There was a case in x86_32 with optimize for size (-Os) where, for a
      few functions, gcc would align the stack frame and place a copy of the
      return address into it. The function graph tracer modified the copy and
      not the actual return address. On return from the funtion, it did not go
      to the tracer hook, but returned to the parent. This broke the function
      graph tracer, because the return of the parent (where gcc did not do
      this funky manipulation) returned to the location that the child function
      was suppose to. This caused strange kernel crashes.
      
      This test detected the problem and pointed out where the issue was.
      
      This modifies the parameters of one of the functions that the arch
      specific code calls, so it includes changes to arch code to accommodate
      the new prototype.
      
      Note, I notice that the parsic arch implements its own push_return_trace.
      This is now a generic function and the ftrace_push_return_trace should be
      used instead. This patch does not touch that code.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      71e308a2
    • B
      mm: Extend gfp masking to the page allocator · dcce284a
      Benjamin Herrenschmidt 提交于
      The page allocator also needs the masking of gfp flags during boot,
      so this moves it out of slab/slub and uses it with the page allocator
      as well.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      dcce284a
    • F
      lib: add lib/gcd.c · d2829224
      Florian Fainelli 提交于
      This patch adds lib/gcd.c which contains a greatest common divider
      implementation taken from sound/core/pcm_timer.c
      
      Several usages of this new library function will be sent to subsystem
      maintainers.
      
      [akpm@linux-foundation.org: use swap() (pointed out by Joe)]
      [akpm@linux-foundation.org: just add gcd.o to obj-y, remove Kconfig changes]
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Julius Volz <juliusv@google.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Patrick McHardy <kaber@trash.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d2829224
    • R
      LinuxPPS: core support · eae9d2ba
      Rodolfo Giometti 提交于
      This patch adds the kernel side of the PPS support currently named
      "LinuxPPS".
      
      PPS means "pulse per second" and a PPS source is just a device which
      provides a high precision signal each second so that an application can
      use it to adjust system clock time.
      
      Common use is the combination of the NTPD as userland program with a GPS
      receiver as PPS source to obtain a wallclock-time with sub-millisecond
      synchronisation to UTC.
      
      To obtain this goal the userland programs shoud use the PPS API
      specification (RFC 2783 - Pulse-Per-Second API for UNIX-like Operating
      Systems, Version 1.0) which in part is implemented by this patch.  It
      provides a set of chars devices, one per PPS source, which can be used to
      get the time signal.  The RFC's functions can be implemented by accessing
      to these char devices.
      Signed-off-by: NRodolfo Giometti <giometti@linux.it>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      eae9d2ba
    • D
      w1-gpio: add external pull-up enable callback · c8a06c1e
      Daniel Mack 提交于
      On embedded devices, sleep mode conditions can be tricky to handle,
      Especially when processors tend to pull-down the w1 bus during sleep.  Bus
      slaves (such as the ds2760) may interpret this as a reason for power-down
      conditions and entirely switch off the device.
      
      This patch adds a callback function pointer to let users switch on and off
      the external pull-up resistor.  This lets the outside world know whether
      the processor is currently actively driving the bus or not.
      
      When this callback is not provided, the code behaviour won't change.
      Signed-off-by: NDaniel Mack <daniel@caiaq.de>
      Acked-by: NVille Syrjala <syrjala@sci.fi>
      Acked-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c8a06c1e
    • P
      gcov: add gcov profiling infrastructure · 2521f2c2
      Peter Oberparleiter 提交于
      Enable the use of GCC's coverage testing tool gcov [1] with the Linux
      kernel.  gcov may be useful for:
      
       * debugging (has this code been reached at all?)
       * test improvement (how do I change my test to cover these lines?)
       * minimizing kernel configurations (do I need this option if the
         associated code is never run?)
      
      The profiling patch incorporates the following changes:
      
       * change kbuild to include profiling flags
       * provide functions needed by profiling code
       * present profiling data as files in debugfs
      
      Note that on some architectures, enabling gcc's profiling option
      "-fprofile-arcs" for the entire kernel may trigger compile/link/
      run-time problems, some of which are caused by toolchain bugs and
      others which require adjustment of architecture code.
      
      For this reason profiling the entire kernel is initially restricted
      to those architectures for which it is known to work without changes.
      This restriction can be lifted once an architecture has been tested
      and found compatible with gcc's profiling. Profiling of single files
      or directories is still available on all platforms (see config help
      text).
      
      [1] http://gcc.gnu.org/onlinedocs/gcc/Gcov.htmlSigned-off-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Li Wei <W.Li@Sun.COM>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2521f2c2
    • P
      seq_file: add function to write binary data · 0b923606
      Peter Oberparleiter 提交于
      seq_write() can be used to construct seq_files containing arbitrary data.
      Required by the gcov-profiling interface to synthesize binary profiling
      data files.
      Signed-off-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Li Wei <W.Li@Sun.COM>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: WANG Cong <xiyou.wangcong@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0b923606
    • P
      kernel: constructor support · b99b87f7
      Peter Oberparleiter 提交于
      Call constructors (gcc-generated initcall-like functions) during kernel
      start and module load.  Constructors are e.g.  used for gcov data
      initialization.
      
      Disable constructor support for usermode Linux to prevent conflicts with
      host glibc.
      Signed-off-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Acked-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Li Wei <W.Li@Sun.COM>
      Cc: Michael Ellerman <michaele@au1.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Heiko Carstens <heicars2@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <mschwid2@linux.vnet.ibm.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b99b87f7
    • A
      ipcns: move free_ipcs() proto · 665c7741
      Alexey Dobriyan 提交于
      Function is really private to ipc/ and avoid struct kern_ipc_perm
      forward declaration.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Reviewed-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      665c7741
    • A