1. 30 Oct, 2010 1 commit
  2. 29 Oct, 2010 39 commits
    • Linus Torvalds's avatar
      Merge branch 'for-2637/s3c24xx-all' of git://git.fluff.org/bjdooks/linux · e4dd6549
      Linus Torvalds authored
      * 'for-2637/s3c24xx-all' of git://git.fluff.org/bjdooks/linux:
        ARM: h1940: add UDA1380 to i2c devices list
        ARM: h1940: Fix backlight and LCD power functions
        ARM: S3C2440: fix boot failure introduced by recent changes in gpiolib
        ARM: S3C2440: various fixes in Kconfig file
        ARM: rx1950: Add UDA1380 to i2c devices list
        ARM: rx1950: Add LEDs support
        ARM: rx1950: Add battery device
        ARM: h1940: Implement mmc_power function
        ARM: h1940: Use gpiolib for latch access
      e4dd6549
    • Ben Dooks's avatar
      ARM: Merge for-2637/s3c24xx/misc · d7b4e421
      Ben Dooks authored
      d7b4e421
    • Ben Dooks's avatar
      ARM: Merge for-2637/s3c24xx/h1940 · 7c1552d1
      Ben Dooks authored
      7c1552d1
    • Ben Dooks's avatar
      ARM: Merge for-2637/s3c24xx/rx1950 · 8f08bfd4
      Ben Dooks authored
      8f08bfd4
    • Vasily Khoruzhick's avatar
      ARM: h1940: add UDA1380 to i2c devices list · 68730b45
      Vasily Khoruzhick authored
      Register UDA1380 codec during H1940 machine init
      Signed-off-by: default avatarVasily Khoruzhick <anarsoul@gmail.com>
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      68730b45
    • Vasily Khoruzhick's avatar
      ARM: h1940: Fix backlight and LCD power functions · 53193dd3
      Vasily Khoruzhick authored
      Current implementation of LCD and backlight power control functions
      is not complete, as result PDA consumes power in suspend.
      Fix this issue by managing state of some latch bits, just like
      WinMobile does.
      Signed-off-by: default avatarVasily Khoruzhick <anarsoul@gmail.com>
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      53193dd3
    • Abdoulaye Walsimou Gaye's avatar
      ARM: S3C2440: fix boot failure introduced by recent changes in gpiolib · bdf5005b
      Abdoulaye Walsimou Gaye authored
      Recent changes in s3c gpio break mini2440 board and may be others.
      The problem is that mach-mini2440.c: mini2440_init()
      (where we call s3c_gpio_setpull()) is called before s3c2440.c: s3c2440_init()
      (where we initialize s3c24xx_gpiocfg_default.set_pull function pointer).
      This causes dereferencing of NULL pointer at boot time and a kernel panic.
      Signed-off-by: default avatarAbdoulaye Walsimou Gaye <awg@embtoolkit.org>
      
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      bdf5005b
    • Abdoulaye Walsimou Gaye's avatar
      ARM: S3C2440: various fixes in Kconfig file · e33ffd4d
      Abdoulaye Walsimou Gaye authored
      * kconfig symbols defined in arch/arm/mach-s3c2440/Kconfig are only available
        when ARCH_S3C2410 is selected, so no need to make some of them depend
        on ARCH_S3C2410.
      * fix CPU_S3C24405B typo in "config S3C2440_DMA".
      * mini2440: remove unconditionally select of SND_S3C24XX_SOC_S3C24XX_UDA134X.
      Those fixes avoid the following warnings at make time:
      
      scripts/kconfig/qconf arch/arm/Kconfig
      warning: (MACH_MINI2440 && ARCH_S3C2410) selects SND_S3C24XX_SOC_S3C24XX_UDA134X
      which has unmet direct dependencies (SND_S3C24XX_SOC && ARCH_S3C2410)
      warning: (CPU_S3C2440 && ARCH_S3C2410 && S3C2410_DMA) selects S3C2440_DMA which
      has unmet direct dependencies (ARCH_S3C2410 && CPU_S3C24405B)
      warning: (CPU_S3C2440 && ARCH_S3C2410 || CPU_S3C2442 && ARCH_S3C2410)
      selects CPU_S3C244X which has unmet direct dependencies (!ARCH_S3C2410)
      Signed-off-by: default avatarAbdoulaye Walsimou Gaye <awg@embtoolkit.org>
      
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      e33ffd4d
    • Linus Torvalds's avatar
      Merge branch 'for-2637/i2c-all' of git://git.fluff.org/bjdooks/linux · 44234d0c
      Linus Torvalds authored
      * 'for-2637/i2c-all' of git://git.fluff.org/bjdooks/linux:
        i2c-intel-mid: Driver depends on PCI
        i2c-intel-mid: support for Moorestown and Medfield platform
        i2c-nomadik: fixup bus delays
        i2c-nomadik: support smbus emulation
        i2c-nomadik: dynamic clocking
        i2c-nomadik: documentation fixes
        i2c-s3c2410: Enable i2c clock only when doing some transfert
      44234d0c
    • Daniel Walker's avatar
      msm: Kconfig: drop unused config options · 4ee7a6c2
      Daniel Walker authored
      These two config options don't exist, and aren't ever going to.
      So I simply delete them.
      Signed-off-by: default avatarDaniel Walker <dwalker@codeaurora.org>
      4ee7a6c2
    • Daniel Walker's avatar
      msm: fix compile failure when no debug uart is selected · 06125ff0
      Daniel Walker authored
      If the board has a debug uart the user is given a choice of which
      uart to use. The user can also select NONE, which means not to use one.
      In most of our header files when NONE is selected nothing is defined
      for MSM_DEBUG_UART_PHYS or MSM_DEBUG_UART_BASE. This causes a compile
      failure in debug-macro.S which expect something to be defined there.
      
      Example of the failure,
      
      arch/arm/kernel/built-in.o: In function `hexbuf':
      linux-2.6/arch/arm/kernel/debug.S:186: undefined reference to `MSM_DEBUG_UART_PHYS'
      linux-2.6/arch/arm/kernel/debug.S:186: undefined reference to `MSM_DEBUG_UART_BASE'
      
      This fixes the compile failure by adding an ifdef to debug-macro.S
      that removes all the debug uart code in the case of NONE.
      Signed-off-by: default avatarDaniel Walker <dwalker@codeaurora.org>
      06125ff0
    • Daniel Walker's avatar
      msm: fix debug-macro.S build failure · bcd72c3e
      Daniel Walker authored
      Originally there was an ifdef case to handle when no debug uart
      was selected. In commit 0ea12930
      that case was removed which causes the following build failure,
      
      linux-2.6/arch/arm/kernel/debug.S: Assembler messages:
      linux-2.6/arch/arm/kernel/debug.S:174: Error: bad instruction `addruart r1,r2'
      linux-2.6/arch/arm/kernel/debug.S:176: Error: bad instruction `waituart r2,r3'
      linux-2.6/arch/arm/kernel/debug.S:177: Error: bad instruction `senduart r1,r3'
      linux-2.6/arch/arm/kernel/debug.S:178: Error: bad instruction `busyuart r2,r3'
      linux-2.6/arch/arm/kernel/debug.S:190: Error: bad instruction `addruart r1,r2'
      
      This is a partial revert to add back the case which was removed with
      two caveats. First the API for the addruart macro was updated, and
      the new addruart case now return 0xfff00000 so that a know IO mapping
      is created instead of a random one.
      
      Cc: Jeremy Kerr <jeremy.kerr@canonical.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Jason Wang <jason77.wang@gmail.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Nicolas Pitre <nico@fluxnic.net>
      Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
      Signed-off-by: default avatarDaniel Walker <dwalker@codeaurora.org>
      bcd72c3e
    • Randy Dunlap's avatar
      i2c-intel-mid: Driver depends on PCI · 9cc11dee
      Randy Dunlap authored
      i2c-intel-mid driver uses PCI data structs and interfaces,
      so it should depend on PCI.  Fixes these build errors:
      
      drivers/i2c/busses/i2c-intel-mid.c:977: error: implicit declaration of function 'pci_request_region'
      drivers/i2c/busses/i2c-intel-mid.c:1077: error: implicit declaration of function 'pci_release_region'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Ba Zheng <zheng.ba@intel.com>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: linux-i2c@vger.kernel.org
      Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
      9cc11dee
    • Linus Torvalds's avatar
      Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 · 91ab9bf7
      Linus Torvalds authored
      * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
        PM / Runtime: Fix typo in status comparison causing warning
      91ab9bf7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig · b7bdcc47
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
        kconfig: Have streamline_config process menuconfigs too
        kconfig: Fix streamline_config to read multi line deps in Kconfig files
        kconfig: Fix missing declaration of variable $dir in streamline_config.pl
        kconfig: Fix variable name typo %prompts in streamline_config.pl
        kconfig: Make localmodconfig handle environment variables
      b7bdcc47
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 1840897a
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
        b43: Fix warning at drivers/mmc/core/core.c:237 in mmc_wait_for_cmd
        mac80211: fix failure to check kmalloc return value in key_key_read
        libertas: Fix sd8686 firmware reload
        ath9k: Fix incorrect access of rate flags in RC
        netfilter: xt_socket: Make tproto signed in socket_mt6_v1().
        stmmac: enable/disable rx/tx in the core with a single write.
        net: atarilance - flags should be unsigned long
        netxen: fix kdump
        pktgen: Limit how much data we copy onto the stack.
        net: Limit socket I/O iovec total length to INT_MAX.
        USB: gadget: fix ethernet gadget crash in gether_setup
        fib: Fix fib zone and its hash leak on namespace stop
        cxgb3: Fix panic in free_tx_desc()
        cxgb3: fix crash due to manipulating queues before registration
        8390: Don't oops on starting dev queue
        dccp ccid-2: Stop polling
        dccp: Refine the wait-for-ccid mechanism
        dccp: Extend CCID packet dequeueing interface
        dccp: Return-value convention of hc_tx_send_packet()
        igbvf: fix panic on load
        ...
      1840897a
    • Linus Torvalds's avatar
      d56f84e7
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6 · 12462f2d
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ecryptfs/ecryptfs-2.6:
        eCryptfs: Print mount_auth_tok_only param in ecryptfs_show_options
        ecryptfs: added ecryptfs_mount_auth_tok_only mount parameter
        ecryptfs: checking return code of ecryptfs_find_auth_tok_for_sig()
        ecryptfs: release keys loaded in ecryptfs_keyring_auth_tok_for_sig()
        eCryptfs: Clear LOOKUP_OPEN flag when creating lower file
        ecryptfs: call vfs_setxattr() in ecryptfs_setxattr()
      12462f2d
    • Valdis.Kletnieks@vt.edu's avatar
      drivers/dma/Kconfig: add part number for Topcliff. · d2df4085
      Valdis.Kletnieks@vt.edu authored
      Product codenames are OK, but once an actual product name is available,
      it should be referenced as well.
      
        http://ark.intel.com/chipset.aspx?familyID=52499Signed-off-by: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d2df4085
    • Greg Kroah-Hartman's avatar
      Staging: dream: remove dream driver and arch from tree · 3414df8c
      Greg Kroah-Hartman authored
      This code is stalled, with no one working on it anymore, and the main
      msm code is now going through the proper channels to get merged
      correctly.
      
      So remove it as it contains a number of kernel information leaks and it
      is doubtful if it even still builds anymore.
      Acked-by: default avatarPavel Machek <pavel@ucw.cz>
      Acked-by: default avatarBryan Huntsman <bryanh@codeaurora.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      3414df8c
    • David S. Miller's avatar
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb · 1e431a9d
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
        kgdb,ppc: Individual register get/set for ppc
        kgdbts: prevent re-entry to kgdbts before it unregisters
        debug_core,x86,blackfin: Clean up hw debug disable API
        kdb: Fix early debugging crash regression
        kgdb,arm: fix register dump
        kdb: fix per_cpu command to remove supress mask
        kdb: Add kdb kernel module sample
      1e431a9d
    • Linus Torvalds's avatar
    • Larry Finger's avatar
      b43: Fix warning at drivers/mmc/core/core.c:237 in mmc_wait_for_cmd · 9f2a0fac
      Larry Finger authored
      On module removal, the sdio version of b43 generates the following warning:
      
      [  851.560519] ------------[ cut here ]------------
      [  851.560531] WARNING: at drivers/mmc/core/core.c:237 mmc_wait_for_cmd+0x88/0x90()
      [  851.560534] Hardware name: 20552PG
      [  851.560536] Modules linked in: b43(-) ssb mmc_block binfmt_misc rfcomm sco bnep ppdev l2cap ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables bridge stp kvm_intel kvm arc4 iwlagn snd_hda_codec_conexant snd_hda_intel snd_hda_codec iwlcore snd_hwdep snd_pcm thinkpad_acpi mac80211 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq r852 joydev snd_timer sm_common pcmcia nand snd_seq_device cfg80211 sdhci_pci btusb psmouse tpm_tis yenta_socket nand_ids lp snd pcmcia_rsrc nand_ecc bluetooth sdhci tpm pcmcia_core parport mtd snd_page_alloc serio_raw tpm_bios soundcore nvram led_class sha256_generic aes_i586 aes_generic dm_crypt i915 drm_kms_helper drm ahci intel_agp i2c_algo_bit intel_gtt e1000e libahci video agpgart output
      [  851.560620] Pid: 2504, comm: rmmod Not tainted 2.6.36-titan0+ #1
      [  851.560622] Call Trace:
      [  851.560631]  [<c014a102>] warn_slowpath_common+0x72/0xa0
      [  851.560636]  [<c04d94c8>] ? mmc_wait_for_cmd+0x88/0x90
      [  851.560641]  [<c04d94c8>] ? mmc_wait_for_cmd+0x88/0x90
      [  851.560645]  [<c014a152>] warn_slowpath_null+0x22/0x30
      [  851.560649]  [<c04d94c8>] mmc_wait_for_cmd+0x88/0x90
      [  851.560655]  [<c0401585>] ? device_release+0x25/0x80
      [  851.560660]  [<c04df210>] mmc_io_rw_direct_host+0xa0/0x150
      [  851.560665]  [<c04df370>] mmc_io_rw_direct+0x30/0x40
      [  851.560669]  [<c04e06e7>] sdio_disable_func+0x37/0xa0
      [  851.560683]  [<f8dfcb80>] b43_sdio_remove+0x30/0x50 [b43]
      [  851.560687]  [<c04df8cc>] sdio_bus_remove+0x1c/0x60
      [  851.560692]  [<c016d39f>] ? blocking_notifier_call_chain+0x1f/0x30
      [  851.560697]  [<c0404991>] __device_release_driver+0x51/0xb0
      [  851.560701]  [<c0404a7f>] driver_detach+0x8f/0xa0
      [  851.560705]  [<c0403c83>] bus_remove_driver+0x63/0xa0
      [  851.560709]  [<c0405039>] driver_unregister+0x49/0x80
      [  851.560713]  [<c0405039>] ? driver_unregister+0x49/0x80
      [  851.560718]  [<c04dfad7>] sdio_unregister_driver+0x17/0x20
      [  851.560727]  [<f8dfcb42>] b43_sdio_exit+0x12/0x20 [b43]
      [  851.560734]  [<f8dfe76f>] b43_exit+0x17/0x3c [b43]
      [  851.560740]  [<c017fb8d>] sys_delete_module+0x13d/0x200
      [  851.560747]  [<c01fd7d2>] ? do_munmap+0x212/0x300
      [  851.560752]  [<c010311f>] sysenter_do_call+0x12/0x28
      [  851.560757] ---[ end trace 31e14488072d2f7d ]---
      [  851.560759] ------------[ cut here ]------------
      
      The warning is caused by b43 not claiming the device before calling
      sdio_disable_func().
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Reported-by: default avatarArnd Hannemann <arnd@arndnet.de>
      Tested-by: default avatarArnd Hannemann <arnd@arndnet.de>
      Cc: Stable <stable@kernel.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      9f2a0fac
    • Jesper Juhl's avatar
      mac80211: fix failure to check kmalloc return value in key_key_read · 520efd1a
      Jesper Juhl authored
      I noticed two small issues in mac80211/debugfs_key.c::key_key_read while
      reading through the code. Patch below.
      
      The key_key_read() function returns ssize_t and the value that's actually
      returned is the return value of simple_read_from_buffer() which also
      returns ssize_t, so let's hold the return value in a ssize_t local
      variable rather than a int one.
      
      Also, memory is allocated dynamically with kmalloc() which can fail, but
      the return value of kmalloc() is not checked, so we may end up operating
      on a null pointer further on. So check for a NULL return and bail out with
      -ENOMEM in that case.
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      520efd1a
    • Paul Fox's avatar
      libertas: Fix sd8686 firmware reload · 731b2034
      Paul Fox authored
      For the SD8686, we cannot rely on the scratch register to read the firmware
      load status, because the same register is used for storing RX packet length.
      Broaden the check to account for this.
      
      The module can now be unloaded/reloaded successfully.
      
      Based on the implementation from libertas_tf.
      Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
      Acked-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarSteve deRosier <steve@cozybit.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      731b2034
    • Mohammed Shafi Shajakhan's avatar
      ath9k: Fix incorrect access of rate flags in RC · 4fc4fbd1
      Mohammed Shafi Shajakhan authored
      The index variable to access the rate flags should be obtained from the
      inner loop counter which corresponds to the rate table structure.This
      fixes the invalid rate selection i.e when the supported basic rate is
      invalid on a particular band and also the following warning message.
      Thanks to Raj for finding this out.
      
      Call Trace:
      
       [<ffffffff8104ee4a>] warn_slowpath_common+0x7a/0xb0
      
       [<ffffffff8104ee95>] warn_slowpath_null+0x15/0x20
      
       [<ffffffffa0583c45>] ath_get_rate+0x595/0x5b0 [ath9k]
      
       [<ffffffff811a0636>] ? cpumask_next_and+0x36/0x50
      
       [<ffffffffa0405186>] rate_control_get_rate+0x86/0x160 [mac80211]
      
       [<ffffffffa040dfac>] invoke_tx_handlers+0x81c/0x12d0 [mac80211]
      
       [<ffffffffa040eae9>] ieee80211_tx+0x89/0x2b0 [mac80211]
      
       [<ffffffff812891bc>] ? pskb_expand_head+0x1cc/0x1f0
      
       [<ffffffffa040edc5>] ieee80211_xmit+0xb5/0x1c0 [mac80211]
      
       [<ffffffffa041026f>] ieee80211_tx_skb+0x4f/0x60 [mac80211]
      
       [<ffffffffa03fe016>] ieee80211_send_nullfunc+0x46/0x60 [mac80211]
      
       [<ffffffffa03f91d7>] ieee80211_offchannel_stop_station+0x107/0x150
      [mac80211]
      
       [<ffffffff812891bc>] ? pskb_expand_head+0x1cc/0x1f0
      
       [<ffffffffa040edc5>] ieee80211_xmit+0xb5/0x1c0 [mac80211]
      
       [<ffffffffa041026f>] ieee80211_tx_skb+0x4f/0x60 [mac80211]
      
       [<ffffffffa03fe016>] ieee80211_send_nullfunc+0x46/0x60 [mac80211]
      
       [<ffffffffa03f91d7>] ieee80211_offchannel_stop_station+0x107/0x150
      [mac80211]
      
       [<ffffffffa03f8896>] ieee80211_scan_work+0x146/0x600 [mac80211]
      
       [<ffffffff8133a375>] ? schedule+0x2f5/0x8e0
      
       [<ffffffffa03f8750>] ? ieee80211_scan_work+0x0/0x600 [mac80211]
      
       [<ffffffff81064fcf>] process_one_work+0x10f/0x380
      
       [<ffffffff81066bc2>] worker_thread+0x162/0x340
      
       [<ffffffff81066a60>] ? worker_thread+0x0/0x340
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      4fc4fbd1
    • Dongdong Deng's avatar
      kgdb,ppc: Individual register get/set for ppc · ff10b88b
      Dongdong Deng authored
      commit 534af108(kgdb,kdb: individual
      register set and and get API) introduce dbg_get_reg/dbg_set_reg API
      for individual register get and set.
      
      This patch implement those APIs for ppc.
      Signed-off-by: default avatarDongdong Deng <dongdong.deng@windriver.com>
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      ff10b88b
    • Dongdong Deng's avatar
      kgdbts: prevent re-entry to kgdbts before it unregisters · 4dacd5c0
      Dongdong Deng authored
      The "kgdb_connected" variable of debug_core just indicates whether or
      not kgdbts is connected to the debug_core.  It does not completely
      prevent a script from trying invoke kgdbts again and possibly crashing
      the system (see Call Trace below).
      
      The configured variable in kgtbts can be used instead of
      kgdb_connected instead of kgdb_connected. The cleanup_kgdbts() can
      also be removed because there is no possible way to build kgdbts as a
      kernel module that you could unload with rmmod.
      
      Call Trace:
      -----------------------------------------------------------------
      root:/$ echo kgdbts=V1S1000 > /sys/module/kgdbts/parameters/kgdbts
      kgdb: Unregistered I/O driver kgdbts, debugger disabled.
      ------------[ cut here ]------------
      WARNING: at kernel/debug/debug_core.c:1002
      kgdb_unregister_io_module+0xec/0x100()
      Hardware name: Moon Creek platform
      Modules linked in:
      Pid: 664, comm: sh Not tainted 2.6.34.1-WR4.0.0.0_standard #58
      Call Trace:
       [<c103b1ed>] warn_slowpath_common+0x6d/0xa0
       [<c1079fdc>] ? kgdb_unregister_io_module+0xec/0x100
       [<c1079fdc>] ? kgdb_unregister_io_module+0xec/0x100
       [<c10544e0>] ? param_attr_store+0x0/0x20
       [<c103b235>] warn_slowpath_null+0x15/0x20
       [<c1079fdc>] kgdb_unregister_io_module+0xec/0x100
       [<c124e4ea>] cleanup_kgdbts+0x1a/0x20
       [<c124eced>] param_set_kgdbts_var+0x6d/0xb0
       [<c124ec80>] ? param_set_kgdbts_var+0x0/0xb0
       [<c10544f7>] param_attr_store+0x17/0x20
       [<c105457c>] module_attr_store+0x2c/0x40
       [<c111fe84>] sysfs_write_file+0x94/0xf0
       [<c10d42f6>] vfs_write+0x96/0x130
       [<c111fdf0>] ? sysfs_write_file+0x0/0xf0
       [<c10d44d6>] sys_write+0x46/0xd0
       [<c13bf329>] system_call_done+0x0/0x4
      ---[ end trace 4eb028c6ee43154c ]---
      kgdb: Unregistered I/O driver kgdbts, debugger disabled.
      -----------------------------------------------------------------
      
      [jason.wessel@windriver.com: remove cleanup_kgdbts() ]
      Signed-off-by: default avatarDongdong Deng <dongdong.deng@windriver.com>
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      4dacd5c0
    • Dongdong Deng's avatar
      debug_core,x86,blackfin: Clean up hw debug disable API · d7ba979d
      Dongdong Deng authored
      The kgdb_disable_hw_debug() was an architecture specific function for
      disabling all hardware breakpoints on a per cpu basis when entering
      the debug core.
      
      This patch will remove the weak function kdbg_disable_hw_debug() and
      change it into a call back which lives with the rest of hw breakpoint
      call backs in struct kgdb_arch.
      Signed-off-by: default avatarDongdong Deng <dongdong.deng@windriver.com>
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      d7ba979d
    • Jason Wessel's avatar
      kdb: Fix early debugging crash regression · 578bd4df
      Jason Wessel authored
      The kdb_current legally be equal to NULL in the early boot of the x86
      arch.  The problem pcan be observed by booting with the kernel arguments:
      
          earlyprintk=vga ekgdboc=kbd kgdbwait
      
      The kdb shell will oops on entry and recursively fault because it
      cannot get past the final stage of shell initialization.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      578bd4df
    • Rabin Vincent's avatar
      kgdb,arm: fix register dump · 834b2964
      Rabin Vincent authored
      DBG_MAX_REG_NUM incorrectly had the number of indices in the GDB regs
      array rather than the number of registers, leading to an oops when the
      "rd" command is used in KDB.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarRabin Vincent <rabin@rab.in>
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      834b2964
    • Jason Wessel's avatar
      kdb: fix per_cpu command to remove supress mask · 931ea248
      Jason Wessel authored
      Rusty pointed out that the per_cpu command uses up lots of space on
      the stack and the cpu supress mask is probably not needed.
      
      This patch removes the need for the supress mask as well as fixing up
      the following problems with the kdb per_cpu command:
        * The per_cpu command should allow an address as an argument
        * When you have more data than can be displayed on one screen allow
          the user to break out of the print loop.
      Reported-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      931ea248
    • Jason Wessel's avatar
      kdb: Add kdb kernel module sample · 4aad8f51
      Jason Wessel authored
      Add an example of how to add a dynamic kdb shell command via a kernel
      module.
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      4aad8f51
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus · b77d643c
      Linus Torvalds authored
      * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (46 commits)
        ftrace/MIPS: Enable C Version of recordmcount
        ftrace/MIPS: Add module support for C version of recordmcount
        ftrace/MIPS: Add MIPS64 support for C version of recordmcount
        MIPS: Make TASK_SIZE reflect proper size for both 32 and 64 bit processes.
        MIPS: Allow UserLocal on MIPS_R1 processors
        MIPS: Honor L2 bypass bit
        MIPS: Add BMIPS CP0 register definitions
        MIPS: Add BMIPS processor types to Kconfig
        MIPS: Decouple BMIPS CPU support from bcm47xx/bcm63xx SoC code
        MIPS: Add support for hardware performance events (mipsxx)
        MIPS: Perf-events: Add callchain support
        MIPS: add support for hardware performance events (skeleton)
        MIPS: add support for software performance events
        MIPS: define local_xchg from xchg_local to atomic_long_xchg
        MIPS: AR7: Add support for Titan (TNETV10xx) SoC variant
        MIPS: AR7: Initialize GPIO earlier
        MIPS: Add platform device and Kconfig for Octeon USB EHCI / OHCI
        USB: Add EHCI and OHCH glue for OCTEON II SOCs.
        MIPS: Octeon: Add register definitions for EHCI / OHCI USB glue logic.
        MIPS: Octeon: Apply CN63XXP1 errata workarounds.
        ...
      b77d643c
    • Wu Zhangjin's avatar
      ftrace/MIPS: Enable C Version of recordmcount · 64575f91
      Wu Zhangjin authored
      Selects HAVE_C_RECORDMCOUNT to use the C version of the recordmcount
      intead of the old Perl Version of recordmcount.
      Signed-off-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
      LKML-Reference: <bb99009a9ac79d3f55a8c8bf1c8bd2bc0e1f160e.1288176026.git.wuzhangjin@gmail.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      64575f91
    • Wu Zhangjin's avatar
      ftrace/MIPS: Add module support for C version of recordmcount · 412910cd
      Wu Zhangjin authored
      Since MIPS modules' address space differs from the core kernel space, to access
      the _mcount in the core kernel, the kernel functions in modules must use long
      call (-mlong-calls): load the _mcount address into one register and jump to the
      address stored by the register:
      
       c:  3c030000        lui     v1,0x0  <-------->  b label
                 c: R_MIPS_HI16  _mcount
                 c: R_MIPS_NONE  *ABS*
                 c: R_MIPS_NONE  *ABS*
      10:  64630000        daddiu  v1,v1,0
                10: R_MIPS_LO16 _mcount
                10: R_MIPS_NONE *ABS*
                10: R_MIPS_NONE *ABS*
      14:	03e0082d 	move	at,ra
      18:	0060f809 	jalr	v1
      label:
      
      In the old Perl version of recordmcount, we only need to record the position of
      the 1st R_MIPS_HI16 type of _mcount, and later, in ftrace_make_nop(), replace
      the instruction in this position by a "b label" and in ftrace_make_call(),
      replace it back.
      
      But, the default C version of recordmcount records all of the _mcount symbols,
      so, we must filter the 2nd _mcount like the Perl version of recordmcount does.
      
      The C version of recordmcount copes with the symbols before they are linked, So
      It doesn't know the type of the symbols and therefore can not filter the
      symbols as the Perl version of recordmcount does. But as we can see above, the
      2nd _mcount symbols of the long call alawys follows the 1st _mcount symbol of
      the same long call, which means the offset from the 1st to the 2nd is fixed, it
      is 0x10-0xc = 4 here, 4 is the length of the 1st load instruciton, for MIPS has
      fixed length of instructions, this offset is always 4.
      
      And as we know, the _mcount is inserted into the entry of every kernel
      function, the offset between the other _mcount's is expected to be always
      bigger than 4. So, to filter the 2ns _mcount symbol of the long call, we can
      simply check the offset between two _mcount symbols, If it is 4, then, filter
      the 2nd _mcount symbol.
      
      To avoid touching too much code, an 'empty' function fn_is_fake_mcount() is
      added for all of the archs, and the specific archs can override it via chaning
      the function pointer: is_fake_mcount in do_file() with the e_machine. e.g. This
      patch adds MIPS_is_fake_mcount() to override the default fn_is_fake_mcount()
      pointed by is_fake_mcount.
      
      This fn_is_fake_mcount() checks if the _mcount symbol is fake, e.g. the 2nd
      _mcount symbol of the long call is fake, for there are 2 _mcount symbols mapped
      to one real mcount call, so, one of them is fake and must be filtered.
      
      This fn_is_fake_mcount() is called in sift_rel_mcount() after finding the
      _mcount symbols and before adding the _mcount symbol into mrelp, so, it can
      prevent the fake mcount symbol going into the last __mcount_loc table.
      Signed-off-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
      LKML-Reference: <b866f0138224340a132d31861fa3f9300dee30ac.1288176026.git.wuzhangjin@gmail.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      412910cd
    • John Reiser's avatar
      ftrace/MIPS: Add MIPS64 support for C version of recordmcount · a2d49358
      John Reiser authored
      MIPS64 has 'weird' Elf64_Rel.r_info[1,2], which must be used instead of
      the generic Elf64_Rel.r_info, otherwise, the C version of recordmcount
      will not work for "segmentation fault".
      
      Usage of "union mips_r_info" and the functions MIPS64_r_sym() and
      MIPS64_r_info() written by Maciej W. Rozycki <macro@linux-mips.org>
      
      ----
      [1] http://techpubs.sgi.com/library/manuals/4000/007-4658-001/pdf/007-4658-001.pdf
      [2] arch/mips/include/asm/module.h
      Tested-by: default avatarWu Zhangjin <wuzhangjin@gmail.com>
      Signed-off-by: default avatarJohn Reiser <jreiser@BitWagon.com>
      Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
      LKML-Reference: <AANLkTinwXjLAYACUfhLYaocHD_vBbiErLN3NjwN8JqSy@mail.gmail.com>
      LKML-Reference: <910dc2d5ae1ed042df4f96815fe4a433078d1c2a.1288176026.git.wuzhangjin@gmail.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      a2d49358
    • David Daney's avatar
      MIPS: Make TASK_SIZE reflect proper size for both 32 and 64 bit processes. · 949e51be
      David Daney authored
      The TASK_SIZE macro should reflect the size of a user process virtual
      address space.  Previously for 64-bit kernels, this was not the case.
      The immediate cause of pain was in
      hugetlbfs/inode.c:hugetlb_get_unmapped_area() where 32-bit processes
      trying to mmap a huge page would be served a page with an address
      outside of the 32-bit address range.  But there are other uses of
      TASK_SIZE in the kernel as well that would like an accurate value.
      
      The new definition is nice because it now makes TASK_SIZE and
      TASK_SIZE_OF() yield the same value for any given process.
      
      For 32-bit kernels there should be no change, although I did factor
      out some code in asm/processor.h that became identical for the 32-bit and
      64-bit cases.
      
      __UA_LIMIT is now set to ~((1 << SEGBITS) - 1) for 64-bit kernels.
      This should eliminate the possibility of getting a
      AddressErrorException in the kernel for addresses that pass the
      access_ok() test.
      
      With the patch applied, I can still run o32, n32 and n64 processes,
      and have an o32 shell fork/exec both n32 and n64 processes.
      Signed-off-by: default avatarDavid Daney <ddaney@caviumnetworks.com>
      To: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/1701/
      949e51be