Skip to content
  1. Mar 04, 2013
    • Linus Torvalds's avatar
      Merge tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag · 8fd5e7a2
      Linus Torvalds authored
      Pull new ImgTec Meta architecture from James Hogan:
       "This adds core architecture support for Imagination's Meta processor
        cores, followed by some later miscellaneous arch/metag cleanups and
        fixes which I kept separate to ease review:
      
         - Support for basic Meta 1 (ATP) and Meta 2 (HTP) core architecture
         - A few fixes all over, particularly for symbol prefixes
         - A few privilege protection fixes
         - Several cleanups (setup.c includes, split out a lot of
           metag_ksyms.c)
         - Fix some missing exports
         - Convert hugetlb to use vm_unmapped_area()
         - Copy device tree to non-init memory
         - Provide dma_get_sgtable()"
      
      * tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: (61 commits)
        metag: Provide dma_get_sgtable()
        metag: prom.h: remove declaration of metag_dt_memblock_reserve()
        metag: copy devicetree to non-init memory
        metag: cleanup metag_ksyms.c includes
        metag: move mm/init.c exports out of metag_ksyms.c
        metag: move usercopy.c exports out of metag_ksyms.c
        metag: move setup.c exports out of metag_ksyms.c
        metag: move kick.c exports out of metag_ksyms.c
        metag: move traps.c exports out of metag_ksyms.c
        metag: move irq enable out of irqflags.h on SMP
        genksyms: fix metag symbol prefix on crc symbols
        metag: hugetlb: convert to vm_unmapped_area()
        metag: export clear_page and copy_page
        metag: export metag_code_cache_flush_all
        metag: protect more non-MMU memory regions
        metag: make TXPRIVEXT bits explicit
        metag: kernel/setup.c: sort includes
        perf: Enable building perf tools for Meta
        metag: add boot time LNKGET/LNKSET check
        metag: add __init to metag_cache_probe()
        ...
      8fd5e7a2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm · 529e5fbc
      Linus Torvalds authored
      Pull late ARM updates from Russell King:
       "Here is the late set of ARM updates for this merge window; in here is:
      
         - The ARM parts of the broadcast timer support, core parts merged
           through tglx's tree.  This was left over from the previous merge to
           allow the dependency on tglx's tree to be resolved.
      
         - A fix to the VFP code which shows up on Raspberry Pi's, as well as
           fixing the fallout from a previous commit in this area.
      
         - A number of smaller fixes scattered throughout the ARM tree"
      
      * 'for-linus' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: Fix broken commit 0cc41e4a corrupting kernel messages
        ARM: fix scheduling while atomic warning in alignment handling code
        ARM: VFP: fix emulation of second VFP instruction
        ARM: 7656/1: uImage: Error out on build of multiplatform without LOADADDR
        ARM: 7640/1: memory: tegra_ahb_enable_smmu() depends on TEGRA_IOMMU_SMMU
        ARM: 7654/1: Preserve L_PTE_VALID in pte_modify()
        ARM: 7653/2: do not scale loops_per_jiffy when using a constant delay clock
        ARM: 7651/1: remove unused smp_timer_broadcast #define
      529e5fbc
    • Linus Torvalds's avatar
      Merge tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 686c0940
      Linus Torvalds authored
      
      
      Pull char/misc patch from Greg Kroah-Hartman:
       "Here is one remaining patch for 3.9-rc1.  It is for the hyper-v
        drivers, and had to wait until some other patches went in through the
        x86 tree."
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      
      * tag 'char-misc-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        Drivers: hv: vmbus: Use the new infrastructure for delivering VMBUS interrupts
      686c0940
    • Linus Torvalds's avatar
      Merge tag 'usb-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · bc2e4a90
      Linus Torvalds authored
      Pull USB patch revert from Greg Kroah-Hartman:
       "Here is one remaining USB patch for 3.9-rc1, it reverts a 3.8 patch
        that has caused a lot of regressions for some VIA EHCI controllers."
      
      * tag 'usb-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: EHCI: revert "remove ASS/PSS polling timeout"
      bc2e4a90
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · 68b86a25
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
       "This contains:
         - fixes and improvements
         - devicetree bindings
         - conversion to watchdog generic framework of the following drivers:
              - booke_wdt
              - bcm47xx_wdt.c
              - at91sam9_wdt
         - Removal of old STMP3xxx driver
         - Addition of following new drivers:
              - new driver for STMP3xxx and i.MX23/28
              - Retu watchdog driver"
      
      * git://www.linux-watchdog.org/linux-watchdog: (30 commits)
        watchdog: sp805_wdt depends on ARM
        watchdog: davinci_wdt: update to devm_* API
        watchdog: davinci_wdt: use devm managed clk get
        watchdog: at91rm9200: add DT support
        watchdog: add timeout-sec property binding
        watchdog: at91sam9_wdt: Convert to use the watchdog framework
        watchdog: omap_wdt: Add option nowayout
        watchdog: core: dt: add support for the timeout-sec dt property
        watchdog: bcm47xx_wdt.c: add hard timer
        watchdog: bcm47xx_wdt.c: rename wdt_time to timeout
        watchdog: bcm47xx_wdt.c: rename ops methods
        watchdog: bcm47xx_wdt.c: use platform device
        watchdog: bcm47xx_wdt.c: convert to watchdog core api
        watchdog: Convert BookE watchdog driver to watchdog infrastructure
        watchdog: s3c2410_wdt: Use devm_* functions
        watchdog: remove old STMP3xxx driver
        watchdog: add new driver for STMP3xxx and i.MX23/28
        rtc: stmp3xxx: add wdt-accessor function
        watchdog: introduce retu_wdt driver
        watchdog: intel_scu_watchdog: fix Kconfig dependency
        ...
      68b86a25
    • Linus Torvalds's avatar
      Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma · 527c680f
      Linus Torvalds authored
      Pull second set of slave-dmaengine updates from Vinod Koul:
       "Arnd's patch moves the dw_dmac to use generic DMA binding.  I agreed
        to merge this late as it will avoid the conflicts between trees.
      
        The second patch from Matt adding a dma_request_slave_channel_compat
        API was supposed to be picked up, but somehow never got picked up.
        Some patches dependent on this are already in -next :("
      
      * 'next' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: dw_dmac: move to generic DMA binding
        dmaengine: add dma_request_slave_channel_compat()
      527c680f
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 · 23caaeea
      Linus Torvalds authored
      Pull x86 platform driver updates from Matthew Garrett:
       "Mostly relatively small updates, along with some hardware enablement
        for Sony hardware and a pile of updates to Google's Chromebook driver"
      
      * 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86: (49 commits)
        ideapad-laptop: Depend on BACKLIGHT_CLASS_DEVICE instead of selecting it
        ideapad: depends on backlight subsystem and update comment
        Platform: x86: chromeos_laptop - add i915 gmbuses to adapter names
        Platform: x86: chromeos_laptop - Add isl light sensor for Pixel
        Platform: x86: chromeos_laptop - Add a more general add_i2c_device
        Platform: x86: chromeos_laptop - Add Pixel Touchscreen
        Platform: x86: chromeos_laptop - Add support for probing devices
        Platform: x86: chromeos_laptop - Add Pixel Trackpad
        hp-wmi: fix handling of platform device
        sony-laptop: leak in error handling sony_nc_lid_resume_setup()
        hp-wmi: Add support for SMBus hotkeys
        asus-wmi: Fix unused function build warning
        acer-wmi: avoid the warning of 'devices' may be used uninitialized
        drivers/platform/x86/thinkpad_acpi.c: Handle HKEY event 0x6040
        Platform: x86: chromeos_laptop - Add HP Pavilion 14
        Platform: x86: chromeos_laptop - Add Taos tsl2583 device
        Platform: x86: chromeos_laptop - Add Taos tsl2563 device
        Platform: x86: chromeos_laptop - Add Acer C7 trackpad
        Platform: x86: chromeos_laptop - Rename setup_lumpy_tp to setup_cyapa_smbus_tp
        asus-laptop: always report brightness key events
        ...
      23caaeea
  2. Mar 03, 2013
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · a7c1120d
      Linus Torvalds authored
      Pull ext4 bug fixes from Ted Ts'o:
       "Various bug fixes for ext4.  The most important is a fix for the new
        extent cache's slab shrinker which can cause significant, user-visible
        pauses when the system is under memory pressure."
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: enable quotas before orphan cleanup
        ext4: don't allow quota mount options when quota feature enabled
        ext4: fix a warning from sparse check for ext4_dir_llseek
        ext4: convert number of blocks to clusters properly
        ext4: fix possible memory leak in ext4_remount()
        jbd2: fix ERR_PTR dereference in jbd2__journal_start
        ext4: use percpu counter for extent cache count
        ext4: optimize ext4_es_shrink()
      a7c1120d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal · 6ec40b42
      Linus Torvalds authored
      Pull sigprocmask compat fix from Al Viro:
       "generic compat_sys_rt_sigprocmask() had a very dumb braino; I'd spent
        quite a while staring at the offending commit before finally managing
        to spot the idiocy ;-/"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
        fix compat_sys_rt_sigprocmask()
      6ec40b42
    • Al Viro's avatar
      fix compat_sys_rt_sigprocmask() · db61ec29
      Al Viro authored
      
      
      Converting bitmask to 32bit granularity is fine, but we'd better
      _do_ something with the result.  Such as "copy it to userland"...
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      db61ec29
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 8d05b377
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "We've just concluded another Connectathon interoperability testing
        week, and so here are the fixes for the bugs that were discovered:
      
         - Don't allow NFS silly-renamed files to be deleted
         - Don't start the retransmission timer when out of socket space
         - Fix a couple of pnfs-related Oopses.
         - Fix one more NFSv4 state recovery deadlock
         - Don't loop forever when LAYOUTGET returns NFS4ERR_LAYOUTTRYLATER"
      
      * tag 'nfs-for-3.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        SUNRPC: One line comment fix
        NFSv4.1: LAYOUTGET EDELAY loops timeout to the MDS
        SUNRPC: add call to get configured timeout
        PNFS: set the default DS timeout to 60 seconds
        NFSv4: Fix another open/open_recovery deadlock
        nfs: don't allow nfs_find_actor to match inodes of the wrong type
        NFSv4.1: Hold reference to layout hdr in layoutget
        pnfs: fix resend_to_mds for directio
        SUNRPC: Don't start the retransmission timer when out of socket space
        NFS: Don't allow NFS silly-renamed files to be deleted, no signal
      8d05b377
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · b695188d
      Linus Torvalds authored
      Pull btrfs update from Chris Mason:
       "The biggest feature in the pull is the new (and still experimental)
        raid56 code that David Woodhouse started long ago.  I'm still working
        on the parity logging setup that will avoid inconsistent parity after
        a crash, so this is only for testing right now.  But, I'd really like
        to get it out to a broader audience to hammer out any performance
        issues or other problems.
      
        scrub does not yet correct errors on raid5/6 either.
      
        Josef has another pass at fsync performance.  The big change here is
        to combine waiting for metadata with waiting for data, which is a big
        latency win.  It is also step one toward using atomics from the
        hardware during a commit.
      
        Mark Fasheh has a new way to use btrfs send/receive to send only the
        metadata changes.  SUSE is using this to make snapper more efficient
        at finding changes between snapshosts.
      
        Snapshot-aware defrag is also included.
      
        Otherwise we have a large number of fixes and cleanups.  Eric Sandeen
        wins the award for removing the most lines, and I'm hoping we steal
        this idea from XFS over and over again."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (118 commits)
        btrfs: fixup/remove module.h usage as required
        Btrfs: delete inline extents when we find them during logging
        btrfs: try harder to allocate raid56 stripe cache
        Btrfs: cleanup to make the function btrfs_delalloc_reserve_metadata more logic
        Btrfs: don't call btrfs_qgroup_free if just btrfs_qgroup_reserve fails
        Btrfs: remove reduplicate check about root in the function btrfs_clean_quota_tree
        Btrfs: return ENOMEM rather than use BUG_ON when btrfs_alloc_path fails
        Btrfs: fix missing deleted items in btrfs_clean_quota_tree
        btrfs: use only inline_pages from extent buffer
        Btrfs: fix wrong reserved space when deleting a snapshot/subvolume
        Btrfs: fix wrong reserved space in qgroup during snap/subv creation
        Btrfs: remove unnecessary dget_parent/dput when creating the pending snapshot
        btrfs: remove a printk from scan_one_device
        Btrfs: fix NULL pointer after aborting a transaction
        Btrfs: fix memory leak of log roots
        Btrfs: copy everything if we've created an inline extent
        btrfs: cleanup for open-coded alignment
        Btrfs: do not change inode flags in rename
        Btrfs: use reserved space for creating a snapshot
        clear chunk_alloc flag on retryable failure
        ...
      b695188d
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd · 48476df9
      Linus Torvalds authored
      Pull MTD update from David Woodhouse:
       "Fairly unexciting MTD merge for 3.9:
      
         - misc clean-ups in the MTD command-line partitioning parser
           (cmdlinepart)
         - add flash locking support for STmicro chips serial flash chips, as
           well as for CFI command set 2 chips.
         - new driver for the ELM error correction HW module found in various
           TI chips, enable the OMAP NAND driver to use the ELM HW error
           correction
         - added number of new serial flash IDs
         - various fixes and improvements in the gpmi NAND driver
         - bcm47xx NAND driver improvements
         - make the mtdpart module actually removable"
      
      * tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd: (45 commits)
        mtd: map: BUG() in non handled cases
        mtd: bcm47xxnflash: use pr_fmt for module prefix in messages
        mtd: davinci_nand: Use managed resources
        mtd: mtd_torturetest can cause stack overflows
        mtd: physmap_of: Convert device allocation to managed devm_kzalloc()
        mtd: at91: atmel_nand: for PMECC, add code to check the ONFI parameter ECC requirement.
        mtd: atmel_nand: make pmecc-cap, pmecc-sector-size in dts is optional.
        mtd: atmel_nand: avoid to report an error when lookup table offset is 0.
        mtd: bcm47xxsflash: adjust names of bus-specific functions
        mtd: bcm47xxpart: improve probing of nvram partition
        mtd: bcm47xxpart: add support for other erase sizes
        mtd: bcm47xxnflash: register this as normal driver
        mtd: bcm47xxnflash: fix message
        mtd: bcm47xxsflash: register this as normal driver
        mtd: bcm47xxsflash: write number of written bytes
        mtd: gpmi: add sanity check for the ECC
        mtd: gpmi: set the Golois Field bit for mx6q's BCH
        mtd: devices: elm: Removes <xx> literals in elm DT node
        mtd: gpmi: fix a dereferencing freed memory error
        mtd: fix the wrong timeo for panic_nand_wait()
        ...
      48476df9
    • Russell King's avatar
    • Trond Myklebust's avatar
      512e4b29
    • Jan Kara's avatar
      ext4: enable quotas before orphan cleanup · 9b2ff357
      Jan Kara authored
      
      
      When using quota feature we need to enable quotas before orphan cleanup
      so that changes happening during it are properly reflected in quota
      accounting.
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      9b2ff357
    • Jan Kara's avatar
      ext4: don't allow quota mount options when quota feature enabled · 262b4662
      Jan Kara authored
      
      
      So far we silently ignored when quota mount options were set while quota
      feature was enabled.  But this can create confusion in userspace when
      mount options are set but silently ignored and also creates opportunities
      for bugs when we don't properly test all quota types.  Actually
      ext4_mark_dquot_dirty() forgets to test for quota feature so it was
      dependent on journaled quota options being set.  OTOH ext4_orphan_cleanup()
      tries to enable journaled quota when quota options are specified which is
      wrong when quota feature is enabled.
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      262b4662
    • Zheng Liu's avatar
      ext4: fix a warning from sparse check for ext4_dir_llseek · d4e43954
      Zheng Liu authored
      
      
      ext4_dir_llseek is only used as a callback function, and no one calls
      it directly.  So make it as a static function in order to remove a
      warning message from sparse check.
      
      Signed-off-by: default avatarZheng Liu <wenqing.lz@taobao.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      d4e43954
    • Lukas Czerner's avatar
      ext4: convert number of blocks to clusters properly · 810da240
      Lukas Czerner authored
      
      
      We're using macro EXT4_B2C() to convert number of blocks to number of
      clusters for bigalloc file systems.  However, we should be using
      EXT4_NUM_B2C().
      
      Signed-off-by: default avatarLukas Czerner <lczerner@redhat.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      810da240
    • Wei Yongjun's avatar
      ext4: fix possible memory leak in ext4_remount() · 3e36a163
      Wei Yongjun authored
      
      
      'orig_data' is malloced in ext4_remount() and should be freed
      before leaving from the error handling cases, otherwise it will
      cause memory leak.
      
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Reviewed-by: default avatarLukas Czerner <lczerner@redhat.com>
      Cc: stable@vger.kernel.org
      3e36a163
    • Dmitry Monakhov's avatar
      jbd2: fix ERR_PTR dereference in jbd2__journal_start · df05c1b8
      Dmitry Monakhov authored
      
      
      If start_this_handle() failed handle will be initialized
      to ERR_PTR() and can not be dereferenced.
      
      paging request at fffffffffffffff6
      IP: [<ffffffff813c073f>] jbd2__journal_start+0x18f/0x290
      PGD 200e067 PUD 200f067 PMD 0
      Oops: 0000 [#1] SMP
      Modules linked in: cpufreq_ondemand acpi_cpufreq freq_table mperf coretemp kvm_intel kvm crc32c_intel ghash_clmulni_intel microcode sg xhci_hcd button sd_mod crc_t10dif aesni_intel ablk_helper cryptd lrw aes_x86_64 xts gf128mul ahci libahci pata_acpi ata_generic dm_mirror dm_region_hash dm_log dm_mod
      CPU 0 journal commit I/O error
      
      Pid: 2694, comm: fio Not tainted 3.8.0-rc3+ #79                  /DQ67SW
      RIP: 0010:[<ffffffff813c073f>]  [<ffffffff813c073f>] jbd2__journal_start+0x18f/0x290
      RSP: 0018:ffff880233b8ba58  EFLAGS: 00010292
      RAX: 00000000ffffffe2 RBX: ffffffffffffffe2 RCX: 0000000000000006
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff82128f48
      RBP: ffff880233b8ba98 R08: 0000000000000000 R09: ffff88021440a6e0
      
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      df05c1b8
    • James Hogan's avatar
      metag: Provide dma_get_sgtable() · c60ac315
      James Hogan authored
      
      
      metag/allmodconfig:
      
      drivers/media/v4l2-core/videobuf2-dma-contig.c: In function 'vb2_dc_get_base_sgt':
      drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function 'dma_get_sgtable'
      
      For architectures using dma_map_ops, dma_get_sgtable() is provided in
      <asm-generic/dma-mapping-common.h>.
      
      Metag does not use dma_map_ops yet, hence it should implement it as an
      inline stub using dma_common_get_sgtable().
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      c60ac315
    • James Hogan's avatar
      metag: prom.h: remove declaration of metag_dt_memblock_reserve() · 2742c526
      James Hogan authored
      
      
      Metag doesn't have a metag_dt_memblock_reserve() function so remove the
      declaration from asm/prom.h.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      2742c526
    • James Hogan's avatar
      metag: copy devicetree to non-init memory · 2270e6d3
      James Hogan authored
      
      
      Make a copy of the device tree blob in non-init memory. It is required
      when using built-in device tree files that the platform code copies the
      blob to non-init memory prior to calling unflatten_device_tree(),
      otherwise the strings that the device tree refer to will get poisoned
      and potentially reused, breaking later reading of the device tree
      post-init (such as compatible matching in modules, debugfs, and the
      procfs interface).
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: default avatarVineet Gupta <vgupta@synopsys.com>
      2270e6d3
    • James Hogan's avatar
      metag: cleanup metag_ksyms.c includes · d7900504
      James Hogan authored
      
      
      Minimise metag_ksyms.c includes to directly include the <asm/*.h> files
      that declare a particular symbol, and not include any unnecessary ones.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      d7900504
    • James Hogan's avatar
      metag: move mm/init.c exports out of metag_ksyms.c · 44c24510
      James Hogan authored
      
      
      It's less error prone to have function symbols exported immediately
      after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
      in metag_ksyms.c for symbols defined in mm/init.c into mm/init.c.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      44c24510
    • James Hogan's avatar
      metag: move usercopy.c exports out of metag_ksyms.c · 9da3ee9a
      James Hogan authored
      
      
      It's less error prone to have function symbols exported immediately
      after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
      in metag_ksyms.c for symbols defined in usercopy.c into usercopy.c
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      9da3ee9a
    • James Hogan's avatar
      metag: move setup.c exports out of metag_ksyms.c · 7293dbed
      James Hogan authored
      
      
      It's less error prone to have function symbols exported immediately
      after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
      in metag_ksyms.c for symbols defined in setup.c into setup.c
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      7293dbed
    • James Hogan's avatar
      metag: move kick.c exports out of metag_ksyms.c · aa29ec5f
      James Hogan authored
      
      
      It's less error prone to have function symbols exported immediately
      after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
      in metag_ksyms.c for symbols defined in kick.c into kick.c
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      aa29ec5f
    • James Hogan's avatar
      metag: move traps.c exports out of metag_ksyms.c · 9fb4aa87
      James Hogan authored
      
      
      It's less error prone to have function symbols exported immediately
      after the function rather than in metag_ksyms.c. Move each EXPORT_SYMBOL
      in metag_ksyms.c for symbols defined in traps.c into traps.c
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      9fb4aa87
    • James Hogan's avatar
      metag: move irq enable out of irqflags.h on SMP · fa771d02
      James Hogan authored
      
      
      The SMP version of arch_local_irq_enable() uses preempt_disable(), but
      <asm/irqflags.h> doesn't include <linux/preempt.h> causing the following
      errors on SMP when pstore/ftrace is enabled (caught by buildbot smp
      allyesconfig):
      
      In file included from include/linux/irqflags.h:15,
                       from fs/pstore/ftrace.c:16:
      arch/metag/include/asm/irqflags.h: In function 'arch_local_irq_enable':
      arch/metag/include/asm/irqflags.h:84: error: implicit declaration of function 'preempt_disable'
      arch/metag/include/asm/irqflags.h:86: error: implicit declaration of function 'preempt_enable_no_resched'
      
      However <linux/preempt.h> cannot be easily included from
      <asm/irqflags.h> as it can cause circular include dependencies in the
      !SMP case, and potentially in the SMP case in the future. Therefore move
      the SMP implementation of arch_local_irq_enable() into traps.c and use
      an inline version of get_trigger_mask() which is also defined in traps.c
      for SMP.
      
      This adds an extra layer of function call / stack push when
      preempt_disable needs to call other functions, however in the
      non-preemptive SMP case it should be about as fast, as it was already
      calling the get_trigger_mask() function which is now used inline.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      fa771d02
    • James Hogan's avatar
      genksyms: fix metag symbol prefix on crc symbols · 97c3ec63
      James Hogan authored
      
      
      Meta uses symbol prefixes, so add "metag" to the list of architectures
      to set the mod_prefix to "_" for. This fixes __crc_* symbols to add the
      extra underscore to match _CRC_SYMBOL macro in <linux/export.h> and so
      that modpost finds them.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      97c3ec63
    • James Hogan's avatar
      metag: hugetlb: convert to vm_unmapped_area() · f75c28d8
      James Hogan authored
      
      
      Convert hugetlb_get_unmapped_area_new_pmd() to use vm_unmapped_area()
      rather than searching the virtual address space itself. This fixes the
      following errors in linux-next due to the specified members being
      removed after other architectures have already been converted:
      
      arch/metag/mm/hugetlbpage.c: In function 'hugetlb_get_unmapped_area_new_pmd':
      arch/metag/mm/hugetlbpage.c:199: error: 'struct mm_struct' has no member named 'cached_hole_size'
      arch/metag/mm/hugetlbpage.c:200: error: 'struct mm_struct' has no member named 'free_area_cache'
      arch/metag/mm/hugetlbpage.c:215: error: 'struct mm_struct' has no member named 'cached_hole_size'
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Acked-by: default avatarMichel Lespinasse <walken@google.com>
      f75c28d8
    • James Hogan's avatar
      metag: export clear_page and copy_page · c838e72a
      James Hogan authored
      
      
      Various file systems use clear_page() and copy_page(), so when they're
      built as modules we get build errors like the following:
      
      ERROR: "clear_page" [fs/ntfs/ntfs.ko] undefined!
      ERROR: "copy_page" [fs/nilfs2/nilfs2.ko] undefined!
      
      Therefore export these functions to modules from metag_ksyms.c to fix
      the errors. This was hit by a randconfig build.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      c838e72a
    • James Hogan's avatar
      metag: export metag_code_cache_flush_all · f626dc70
      James Hogan authored
      
      
      Various file systems indirectly use metag_code_cache_flush_all(), so
      when they're built as modules we get build errors like the following:
      
      ERROR: "metag_code_cache_flush_all" [fs/xfs/xfs.ko] undefined!
      
      Therefore export this function to modules to fix the errors. This was
      hit by a randconfig build.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      f626dc70
    • James Hogan's avatar
      metag: protect more non-MMU memory regions · 3d6b7bb0
      James Hogan authored
      
      
      Rename setup_txprivext() to setup_priv() and add initialisation of some
      more per-thread privilege protection registers:
      
       - TxPRIVSYSR: 0x04400000-0x047fffff
                     0x05000000-0x07ffffff
                     0x84000000-0x87ffffff
       - TxPIOREG:   0x02000000-0x02ffffff
                     0x04800000-0x048fffff
       - TxSYREG:    0x04000000-0x04000fff (except write fetch system event)
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      3d6b7bb0
    • James Hogan's avatar
      metag: make TXPRIVEXT bits explicit · c787c2d6
      James Hogan authored
      
      
      Define PRIV_BITS using explicit constants from <asm/metag_regs.h> rather
      than with a hard coded value. This also adds a couple of missing
      definitions for the TXPRIVEXT priv bits for protecting writes to TXTIMER
      and the trace registers.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      c787c2d6
    • James Hogan's avatar
      metag: kernel/setup.c: sort includes · 82f0167a
      James Hogan authored
      
      
      Sort includes in kernel/setup.c.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      82f0167a
    • James Hogan's avatar
      perf: Enable building perf tools for Meta · 1bea5b81
      James Hogan authored
      
      
      Define rmb(), cpu_relax(), and CPUINFO_PROC for Meta so that the perf
      tools can be built for Meta.
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      1bea5b81
    • James Hogan's avatar
      metag: add boot time LNKGET/LNKSET check · 883a6355
      James Hogan authored
      
      
      Add boot time check for whether LNKGET/LNKSET go through or around the
      cache. Depending on the configuration an info message (no harm), warning
      (technically wrong but no harm), or big WARN (expect failure in either
      kernel or userland) may be emitted if the behaviour is not as expected:
      
      Configuration                                Hardware   Response
      ------------------------------------------   --------   --------
      AROUND_CACHE                                 through    pr_info
      !AROUND_CACHE && ATOMICITY_LNKGET            around     WARN (kernel)
           "        && !ATOMICITY_LNKGET && SMP    around     WARN (user)
           "                   "         && !SMP   around     pr_warn
      
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      883a6355