]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 2 May 2013 21:43:58 +0000 (14:43 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "Two regression fixes:

  1. On 64 bits, we would set NX on non-NX-capable hardware (very rare
     in 64-bit land, but a nonzero subset.)

  2. Fix suspend/resume across kernel versions"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64, init: Do not set NX bits on non-NX capable hardware
  x86, gdt, hibernate: Store/load GDT for hibernate path.

11 years agoMerge tag 'pinctrl-fixes-v3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 2 May 2013 21:42:46 +0000 (14:42 -0700)]
Merge tag 'pinctrl-fixes-v3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pinctrl fixes from Linus Walleij:
 "Two fixes to the pinctrl subsystem for v3.10:
   - A quite apparent mutex fix in an untested codepath
   - A compile warning fix in the plgpio driver"

* tag 'pinctrl-fixes-v3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: fix mutex deadlock in get_pinctrl_dev_from_of_node()
  pinctrl: plgpio: add CONFIG_PM_SLEEP to suspend/resume functions

11 years agoMerge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Thu, 2 May 2013 21:38:53 +0000 (14:38 -0700)]
Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c changes from Wolfram Sang:

 - an arbitration driver.  While the driver is quite simple, it caused
   discussion if we need additional arbitration on top of the one
   specified in the I2C standard.  Conclusion is that I accept a few
   generic mechanisms, but not very specific ones.

 - the core lost the detach_adapter() call.  It has no users anymore and
   was in the way for other cleanups.  attach_adapter() is sadly still
   there since there are users waiting to be converted.

 - the core gained a bus recovery infrastructure.  I2C defines a way to
   recover if the data line is stalled.  This mechanism is now in the
   core and drivers can now pass some data to make use of it.

 - bigger driver cleanups for designware, s3c2410

 - removing superfluous refcounting from drivers

 - removing Ben Dooks as second maintainer due to inactivity.  Thanks
   for all your work so far, Ben!

 - bugfixes, feature additions, devicetree fixups, simplifications...

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
  i2c: xiic: must always write 16-bit words to TX_FIFO
  i2c: octeon: use HZ in timeout value
  i2c: octeon: Fix i2c fail problem when a process is terminated by a signal
  i2c: designware-pci: drop superfluous {get|put}_device
  i2c: designware-plat: drop superfluous {get|put}_device
  i2c: davinci: drop superfluous {get|put}_device
  MAINTAINERS: Ben Dooks is inactive regarding I2C
  i2c: mux: Add i2c-arb-gpio-challenge 'mux' driver
  i2c: at91: convert to dma_request_slave_channel_compat()
  i2c: mxs: do error checking and handling in PIO mode
  i2c: mxs: remove races in PIO code
  i2c-designware: switch to use runtime PM autosuspend
  i2c-designware: use usleep_range() in the busy-loop
  i2c-designware: enable/disable the controller properly
  i2c-designware: use dynamic adapter numbering on Lynxpoint
  i2c-designware-pci: use managed functions pcim_* and devm_*
  i2c-designware-pci: use dev_err() instead of printk()
  i2c-designware: move to managed functions (devm_*)
  i2c: remove CONFIG_HOTPLUG ifdefs
  i2c: s3c2410: Add SMBus emulation for block read
  ...

11 years agoMerge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 2 May 2013 21:14:04 +0000 (14:14 -0700)]
Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull virtio & lguest updates from Rusty Russell:
 "Lots of virtio work which wasn't quite ready for last merge window.

  Plus I dived into lguest again, reworking the pagetable code so we can
  move the switcher page: our fixmaps sometimes take more than 2MB now..."

Ugh.  Annoying conflicts with the tcm_vhost -> vhost_scsi rename.
Hopefully correctly resolved.

* tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (57 commits)
  caif_virtio: Remove bouncing email addresses
  lguest: improve code readability in lg_cpu_start.
  virtio-net: fill only rx queues which are being used
  lguest: map Switcher below fixmap.
  lguest: cache last cpu we ran on.
  lguest: map Switcher text whenever we allocate a new pagetable.
  lguest: don't share Switcher PTE pages between guests.
  lguest: expost switcher_pages array (as lg_switcher_pages).
  lguest: extract shadow PTE walking / allocating.
  lguest: make check_gpte et. al return bool.
  lguest: assume Switcher text is a single page.
  lguest: rename switcher_page to switcher_pages.
  lguest: remove RESERVE_MEM constant.
  lguest: check vaddr not pgd for Switcher protection.
  lguest: prepare to make SWITCHER_ADDR a variable.
  virtio: console: replace EMFILE with EBUSY for already-open port
  virtio-scsi: reset virtqueue affinity when doing cpu hotplug
  virtio-scsi: introduce multiqueue support
  virtio-scsi: push vq lock/unlock into virtscsi_vq_done
  virtio-scsi: pass struct virtio_scsi to virtqueue completion function
  ...

11 years agoMerge tag 'vfio-for-v3.10' of git://github.com/awilliam/linux-vfio
Linus Torvalds [Thu, 2 May 2013 21:02:32 +0000 (14:02 -0700)]
Merge tag 'vfio-for-v3.10' of git://github.com/awilliam/linux-vfio

Pull vfio updates from Alex Williamson:
 "Changes include extension to support PCI AER notification to
  userspace, byte granularity of PCI config space and access to
  unarchitected PCI config space, better protection around IOMMU driver
  accesses, default file mode fix, and a few misc cleanups."

* tag 'vfio-for-v3.10' of git://github.com/awilliam/linux-vfio:
  vfio: Set container device mode
  vfio: Use down_reads to protect iommu disconnects
  vfio: Convert container->group_lock to rwsem
  PCI/VFIO: use pcie_flags_reg instead of access PCI-E Capabilities Register
  vfio-pci: Enable raw access to unassigned config space
  vfio-pci: Use byte granularity in config map
  vfio: make local function vfio_pci_intx_unmask_handler() static
  VFIO-AER: Vfio-pci driver changes for supporting AER
  VFIO: Wrapper for getting reference to vfio_device

11 years agodrivers: net: cpsw: irq not disabled in cpsw isr in particular sequence
Mugunthan V N [Thu, 2 May 2013 01:52:11 +0000 (01:52 +0000)]
drivers: net: cpsw: irq not disabled in cpsw isr in particular sequence

In CPSW NAPI, after processing all interrupts IRQ is enabled and then book
keeping irq_enabled is updated. In random cases when a packet is transmitted
or received between processing packets and IRQ enabled, then just after
enabled IRQ and before irq_enabled is updated, ISR is called so IRQs are
not disabled as irq_enabled is still false and CPU gets locked in CPSW ISR.

By changing the sequence as update the irq_enabled and then enable IRQ
fixes the issue. This issue is not captured always as it is a timing issue
whether Tx or Rx IRQ is invoked between packet processing and enable IRQ.

Cc: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoxen-netback: better names for thresholds
Wei Liu [Thu, 2 May 2013 00:43:59 +0000 (00:43 +0000)]
xen-netback: better names for thresholds

This patch only changes some names to avoid confusion.

In this patch we have:

  MAX_SKB_SLOTS_DEFAULT -> FATAL_SKB_SLOTS_DEFAULT
  max_skb_slots -> fatal_skb_slots
  #define XEN_NETBK_LEGACY_SLOTS_MAX XEN_NETIF_NR_SLOTS_MIN

The fatal_skb_slots is the threshold to determine whether a packet is
malicious.

XEN_NETBK_LEGACY_SLOTS_MAX is the maximum slots a valid packet can have at
this point. It is defined to be XEN_NETIF_NR_SLOTS_MIN because that's
guaranteed to be supported by all backends.

Suggested-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoxen-netback: avoid allocating variable size array on stack
Wei Liu [Thu, 2 May 2013 00:43:58 +0000 (00:43 +0000)]
xen-netback: avoid allocating variable size array on stack

Tune xen_netbk_count_requests to not touch working array beyond limit, so that
we can make working array size constant.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoxen-netback: remove redundent parameter in netbk_count_requests
Wei Liu [Thu, 2 May 2013 00:43:57 +0000 (00:43 +0000)]
xen-netback: remove redundent parameter in netbk_count_requests

Tracking down from the caller, first_idx is always equal to vif->tx.req_cons.
Remove it to avoid confusion.

Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: Fix to fail probe if MSI-X enable fails for a VF
Somnath Kotur [Thu, 2 May 2013 03:37:08 +0000 (03:37 +0000)]
be2net: Fix to fail probe if MSI-X enable fails for a VF

As per SPEC, INTx mode is not supported on VFs. So if enable_msix fails,
then just fail probe. Also bail out of be_open if irq_register fails.

Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: avoid napi_disable() when it has not been enabled
Somnath Kotur [Thu, 2 May 2013 03:36:55 +0000 (03:36 +0000)]
be2net: avoid napi_disable() when it has not been enabled

When RQ creation fails in be_open(), driver jumps to be_close() where
napi_disable() is done without a prior napi_enable(); leading to a hang.
This change is needed as there is no way to see if napi is enable/disabled.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: Fix firmware download for Lancer
Somnath Kotur [Thu, 2 May 2013 03:36:34 +0000 (03:36 +0000)]
be2net: Fix firmware download for Lancer

Increasing the timeout value of write_object command to 60 seconds as
30 second timeout was found to be not enough for the command to complete.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: Fix to receive Multicast Packets when Promiscuous mode is enabled on certain...
Ajit Khaparde [Wed, 1 May 2013 09:38:24 +0000 (09:38 +0000)]
be2net: Fix to receive Multicast Packets when Promiscuous mode is enabled on certain devices

When a user requests Promiscuous mode on SkyHawk-R devices,
the FW enables Desparate Promiscuous mode.
Due to this, we need to explicitly enable Multicast Promiscuous mode
so that Multicast packets are received as well.

This patch fixes that.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: Fix to show tx priority pause counter in ethtool -S
Ajit Khaparde [Wed, 1 May 2013 09:38:00 +0000 (09:38 +0000)]
be2net: Fix to show tx priority pause counter in ethtool -S

The tx priority pause count is available with the driver.
But we were not showing it.
This change should fix it and display it in ethtool stats.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: Fix to use 32-bit stats to report rx_drops_no_fragment
Ajit Khaparde [Wed, 1 May 2013 09:37:27 +0000 (09:37 +0000)]
be2net: Fix to use 32-bit stats to report rx_drops_no_fragment

Only BE devices provide 16-bit counter for rx_drops_no_fragment.
All other devices provide a 32-bit counter for this stat.
Use the 32-bit value where available.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobe2net: Fix to use version 2 of cq_create for SkyHawk-R devices
Ajit Khaparde [Wed, 1 May 2013 09:37:17 +0000 (09:37 +0000)]
be2net: Fix to use version 2 of cq_create for SkyHawk-R devices

SkyHawk-R devices should use v2 of cq_create command.
BE3/BE2 devices can use version 0 of the command to create a CQ.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrm/nouveau: fix build with nv50->nvc0
Dave Airlie [Thu, 2 May 2013 20:40:37 +0000 (06:40 +1000)]
drm/nouveau: fix build with nv50->nvc0

Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoMerge branch 'cleanup' into for-linus
Russell King [Thu, 2 May 2013 20:31:29 +0000 (21:31 +0100)]
Merge branch 'cleanup' into for-linus

Conflicts:
arch/arm/plat-omap/dmtimer.c

11 years agoMerge branches 'devel-stable', 'entry', 'fixes', 'mach-types', 'misc' and 'smp-hotplu...
Russell King [Thu, 2 May 2013 20:30:36 +0000 (21:30 +0100)]
Merge branches 'devel-stable', 'entry', 'fixes', 'mach-types', 'misc' and 'smp-hotplug' into for-linus

11 years agoMerge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Thu, 2 May 2013 20:29:14 +0000 (13:29 -0700)]
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull vhost cleanups and fixes from Michael Tsirkin:
 "Here are vhost cleanups and fixes by Asias He and myself.  They affect
  both vhost-net and vhost-scsi devices.  They also *depend* on both
  net-next and target-pending, where the net and target commits these
  changes depend on are already merged.  So merging through the common
  vhost tree."

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vhost_scsi: module rename
  tcm_vhost: header split up
  vhost: src file renames
  vhost: fix error handling in RESET_OWNER ioctl
  tcm_vhost: remove virtio-net.h dependency
  vhost: move per-vq net specific fields out to net
  tcm_vhost: document inflight ref-counting use
  vhost: move vhost-net zerocopy fields to net.c
  tcm_vhost: Wait for pending requests in vhost_scsi_flush()
  vhost: Allow device specific fields per vq

11 years agoMerge commit '73053d973' into smp-hotplug
Russell King [Thu, 2 May 2013 20:20:46 +0000 (21:20 +0100)]
Merge commit '73053d973' into smp-hotplug

This is to fix a merge problem with mach-highbank/hotplug.c, which git
silently resolves, but wrongly.  This commit contains the correct
resolution.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: EXYNOS: remove unnecessary use of IS_ERR_VALUE()
Russell King [Wed, 13 Mar 2013 20:50:02 +0000 (20:50 +0000)]
ARM: EXYNOS: remove unnecessary use of IS_ERR_VALUE()

s5p_register_gpio_interrupt() returns 0 or positive for success, and
-ve for errors, so just use the standard >= 0 test.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: IMX: remove unnecessary use of IS_ERR_VALUE()
Russell King [Wed, 13 Mar 2013 20:49:10 +0000 (20:49 +0000)]
ARM: IMX: remove unnecessary use of IS_ERR_VALUE()

device_register() returns -ve values for errors, and zero for success.
There's no need to obfuscate the code with IS_ERR_VALUE().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: OMAP: use consistent error checking
Russell King [Wed, 13 Mar 2013 20:44:21 +0000 (20:44 +0000)]
ARM: OMAP: use consistent error checking

Consistently check errors using the usual method used in the kernel
for much of its history.  For instance:

int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t)
{
int div;
div = gpmc_calc_divider(t->sync_clk);
if (div < 0)
return div;
static int gpmc_set_async_mode(int cs, struct gpmc_timings *t)
{
...
return gpmc_cs_set_timings(cs, t);

.....
ret = gpmc_set_async_mode(gpmc_onenand_data->cs, &t);
if (IS_ERR_VALUE(ret))
return ret;

So, gpmc_cs_set_timings() thinks any negative return value is an error,
but where we check that in higher levels, only a limited range are
errors...

There is only _one_ use of IS_ERR_VALUE() in arch/arm which is really
appropriate, and that is in arch/arm/include/asm/syscall.h:

static inline long syscall_get_error(struct task_struct *task,
     struct pt_regs *regs)
{
unsigned long error = regs->ARM_r0;
return IS_ERR_VALUE(error) ? error : 0;
}

because this function really does have to differentiate between error
return values and addresses which look like negative numbers (eg, from
mmap()).

So, here's a patch to remove them from OMAP, except for the above.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: cleanup: OMAP hwmod error checking
Russell King [Sun, 24 Feb 2013 10:56:59 +0000 (10:56 +0000)]
ARM: cleanup: OMAP hwmod error checking

omap_hwmod_lookup() only returns NULL on error, never an error pointer.
Checking the returned pointer using IS_ERR_OR_NULL() is needless
overhead.  Use a simple !ptr check instead.

OMAP devices (oh->od) always have a valid platform device attached (see
omap_device_alloc()) so there's no point validating the platform device
pointer (we will have already oopsed long before if this is not the
case here.)

Lastly, oh->od is only ever NULL or a valid omap device pointer - 'oh'
comes from the statically declared hwmod tables, and the pointer is
only filled in by omap_device_alloc() at a point where the omap device
pointer must be valid.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agox86-64, init: Do not set NX bits on non-NX capable hardware
H. Peter Anvin [Thu, 2 May 2013 17:33:46 +0000 (10:33 -0700)]
x86-64, init: Do not set NX bits on non-NX capable hardware

During early init, we would incorrectly set the NX bit even if the NX
feature was not supported.  Instead, only set this bit if NX is
actually available and enabled.  We already do very early detection of
the NX bit to enable it in EFER, this simply extends this detection to
the early page table mask.

Reported-by: Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1367476850.5660.2.camel@nexus
Cc: <stable@vger.kernel.org> v3.9
11 years agox86, gdt, hibernate: Store/load GDT for hibernate path.
Konrad Rzeszutek Wilk [Thu, 2 May 2013 01:53:30 +0000 (21:53 -0400)]
x86, gdt, hibernate: Store/load GDT for hibernate path.

The git commite7a5cd063c7b4c58417f674821d63f5eb6747e37
("x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path
is not needed.") assumes that for the hibernate path the booting
kernel and the resuming kernel MUST be the same. That is certainly
the case for a 32-bit kernel (see check_image_kernel and
CONFIG_ARCH_HIBERNATION_HEADER config option).

However for 64-bit kernels it is OK to have a different kernel
version (and size of the image) of the booting and resuming kernels.
Hence the above mentioned git commit introduces an regression.

This patch fixes it by introducing a 'struct desc_ptr gdt_desc'
back in the 'struct saved_context'. However instead of having in the
'save_processor_state' and 'restore_processor_state' the
store/load_gdt calls, we are only saving the GDT in the
save_processor_state.

For the restore path the lgdt operation is done in
hibernate_asm_[32|64].S in the 'restore_registers' path.

The apt reader of this description will recognize that only 64-bit
kernels need this treatment, not 32-bit. This patch adds the logic
in the 32-bit path to be more similar to 64-bit so that in the future
the unification process can take advantage of this.

[ hpa: this also reverts an inadvertent on-disk format change ]

Suggested-by: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Link: http://lkml.kernel.org/r/1367459610-9656-2-git-send-email-konrad.wilk@oracle.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agonet: vlan,ethtool: netdev_features_t is more than 32 bit
Bjørn Mork [Wed, 1 May 2013 23:06:42 +0000 (23:06 +0000)]
net: vlan,ethtool: netdev_features_t is more than 32 bit

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: use netdev_features_t in skb_needs_linearize()
Patrick McHardy [Wed, 1 May 2013 22:36:49 +0000 (22:36 +0000)]
net: use netdev_features_t in skb_needs_linearize()

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 2 May 2013 17:16:16 +0000 (10:16 -0700)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc update from Benjamin Herrenschmidt:
 "The main highlights this time around are:

   - A pile of addition POWER8 bits and nits, such as updated
     performance counter support (Michael Ellerman), new branch history
     buffer support (Anshuman Khandual), base support for the new PCI
     host bridge when not using the hypervisor (Gavin Shan) and other
     random related bits and fixes from various contributors.

   - Some rework of our page table format by Aneesh Kumar which fixes a
     thing or two and paves the way for THP support.  THP itself will
     not make it this time around however.

   - More Freescale updates, including Altivec support on the new e6500
     cores, new PCI controller support, and a pile of new boards support
     and updates.

   - The usual batch of trivial cleanups & fixes"

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (156 commits)
  powerpc: Fix build error for book3e
  powerpc: Context switch the new EBB SPRs
  powerpc: Turn on the EBB H/FSCR bits
  powerpc: Replace CPU_FTR_BCTAR with CPU_FTR_ARCH_207S
  powerpc: Setup BHRB instructions facility in HFSCR for POWER8
  powerpc: Fix interrupt range check on debug exception
  powerpc: Update tlbie/tlbiel as per ISA doc
  powerpc: Print page size info during boot
  powerpc: print both base and actual page size on hash failure
  powerpc: Fix hpte_decode to use the correct decoding for page sizes
  powerpc: Decode the pte-lp-encoding bits correctly.
  powerpc: Use encode avpn where we need only avpn values
  powerpc: Reduce PTE table memory wastage
  powerpc: Move the pte free routines from common header
  powerpc: Reduce the PTE_INDEX_SIZE
  powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format
  powerpc: New hugepage directory format
  powerpc: Don't truncate pgd_index wrongly
  powerpc: Don't hard code the size of pte page
  powerpc: Save DAR and DSISR in pt_regs on MCE
  ...

11 years agoMerge tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 2 May 2013 16:38:16 +0000 (09:38 -0700)]
Merge tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC multiplatform updates from Olof Johansson:
 "More multiplatform enablement for ARM platforms.  The ones converted
  in this branch are:

   - bcm2835
   - cns3xxx
   - sirf
   - nomadik
   - msx
   - spear
   - tegra
   - ux500

  We're getting close to having most of them converted!

  One of the larger platforms remaining is Samsung Exynos, and there are
  a bunch of supporting patches in this merge window for it.  There was
  a patch in this branch to a early version of multiplatform conversion,
  but it ended up being reverted due to need of more bake time.  The
  revert commit is part of the branch since it would have required
  rebasing multiple dependent branches and they were stable by then"

* tag 'multiplatform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits)
  mmc: sdhci-s3c: Fix operation on non-single image Samsung platforms
  clocksource: nomadik-mtu: fix up clocksource/timer
  Revert "ARM: exynos: enable multiplatform support"
  ARM: SPEAr13xx: Fix typo "ARCH_HAVE_CPUFREQ"
  ARM: exynos: enable multiplatform support
  rtc: s3c: make header file local
  mtd: onenand/samsung: make regs-onenand.h file local
  thermal/exynos: remove unnecessary header inclusions
  mmc: sdhci-s3c: remove platform dependencies
  ARM: samsung: move mfc device definition to s5p-dev-mfc.c
  ARM: exynos: move debug-macro.S to include/debug/
  ARM: exynos: prepare for sparse IRQ
  ARM: exynos: introduce EXYNOS_ATAGS symbol
  ARM: tegra: build assembly files with -march=armv7-a
  ARM: Push selects for TWD/SCU into machine entries
  ARM: ux500: build hotplug.o for ARMv7-a
  ARM: ux500: move to multiplatform
  ARM: ux500: make remaining headers local
  ARM: ux500: make irqs.h local to platform
  ARM: ux500: get rid of <mach/[hardware|db8500-regs].h>
  ...

11 years agoMerge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Thu, 2 May 2013 16:31:45 +0000 (09:31 -0700)]
Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC platform updates from Olof Johansson:
 "This branch contains part 1 of the platform updates for 3.10.  Among
  the highlights:

   - Support for the new Atmel Cortex-A5 based platforms (SAMA5D3)
   - New support for CSR SiRFatlas6 SoCs
   - A handful of updates for NVidia T114 (a.k.a. Tegra 4)
   - A bunch of updates for the shmobile platforms
   - A handful of updates for davinci
   - A few updates for Qualcomm MSM
   - Plus a handful of other patches, defconfig updates, etc."

* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (135 commits)
  ARM: tegra: pm: fix build error w/o PM_SLEEP
  ARM: davinci: ensure global variables are declared
  ARM: davinci: sram.c: fix incorrect type in assignment
  ARM: davinci: da8xx dt: make file local symbols static
  ARM: davinci: da8xx: add remoteproc support
  ARM: socfpga: Upgrade clk driver for socfpga to make use of dts clock entries
  ARM: socfpga: Add clock entries into device tree
  ARM: socfpga: Enable soft reset
  ARM: EXYNOS: replace cpumask by the corresponding macro
  ARM: EXYNOS: handle properly the return values
  ARM: EXYNOS: factor out the idle states
  ARM: OMAP4: Enable fix for Cortex-A9 erratas
  ARM: OMAP2+: Export SoC information to userspace
  ARM: OMAP2+: SoC name and revision unification
  ARM: OMAP2+: Move common part of late init into common function
  ARM: tegra: pm: remove duplicated include from pm.c
  ARM: davinci: da850: override mmc DT node device name
  ARM: davinci: da850: add mmc DT entries
  mmc: davinci_mmc: add DT support
  ARM: SAMSUNG: check processor type before cache restoration in resume
  ...

11 years agoMerge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Thu, 2 May 2013 16:28:03 +0000 (09:28 -0700)]
Merge tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC device-tree updates from Olof Johansson:
 "Part 1 of device-tree updates for 3.10.  The bulk of the churn in this
  branch is due to i.MX moving from C-defined pin control over to device
  tree, which is a one-time conversion that will allow greater
  flexibility down the road.

  Besides that, there's PCI-e bindings for Marvell mvebu platforms and a
  handful of cleanups to tegra due to the new include file functionality
  of the device tree compiler"

* tag 'dt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (113 commits)
  arm: mvebu: PCIe Device Tree informations for Armada XP GP
  arm: mvebu: PCIe Device Tree informations for Armada 370 DB
  arm: mvebu: PCIe Device Tree informations for Armada 370 Mirabox
  arm: mvebu: PCIe Device Tree informations for Armada XP DB
  arm: mvebu: PCIe Device Tree informations for OpenBlocks AX3-4
  arm: mvebu: add PCIe Device Tree informations for Armada XP
  arm: mvebu: add PCIe Device Tree informations for Armada 370
  ARM: sunxi: unify osc24M_fixed and osc24M
  arm: vt8500: Add SDHC support to WM8505 DT
  ARM: dts: Add a 64 bits version of the skeleton device tree
  ARM: mvebu: Add Device Bus and CFI flash memory support to defconfig
  ARM: mvebu: Add support for NOR flash device on Openblocks AX3 board
  ARM: mvebu: Add support for NOR flash device on Armada XP-GP board
  ARM: mvebu: Add Device Bus support for Armada 370/XP SoC
  ARM: dts: imx6dl-wandboard: Add USB Host support
  ARM: dts: imx51 cpu node
  ARM: dts: Add missing imx27-phytec-phycore dtb target
  ARM: dts: Add NFC support for i.MX27 Phytec PCM038 module
  ARM: i.MX51: Add PATA support
  ARM: dts: Add initial support for Wandboard Dual-Lite
  ...

11 years agoMerge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Thu, 2 May 2013 16:03:55 +0000 (09:03 -0700)]
Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC cleanup from Olof Johansson:
 "Here is a collection of cleanup patches.  Among the pieces that stand
  out are:

   - The deletion of h720x platforms
   - Split of at91 non-dt platforms to their own Kconfig file to keep
     them separate
   - General cleanups and refactoring of i.MX and MXS platforms
   - Some restructuring of clock tables for OMAP
   - Convertion of PMC driver for Tegra to dt-only
   - Some renames of sunxi -> sun4i (Allwinner A10)
   - ... plus a bunch of other stuff that I haven't mentioned"

* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (119 commits)
  ARM: i.MX: remove unused ARCH_* configs
  ARM i.MX53: remove platform ahci support
  ARM: sunxi: Rework the restart code
  irqchip: sunxi: Rename sunxi to sun4i
  irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro
  clocksource: sunxi: Rename sunxi to sun4i
  clocksource: sunxi: make use of CLKSRC_OF
  clocksource: sunxi: Cleanup the timer code
  ARM: at91: remove trailing semicolon from macros
  ARM: at91/setup: fix trivial typos
  ARM: EXYNOS: remove "config EXYNOS_DEV_DRM"
  ARM: EXYNOS: change the name of USB ohci header
  ARM: SAMSUNG: Remove unnecessary code for dma
  ARM: S3C24XX: Remove unused GPIO drive strength register definitions
  ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method
  ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412
  ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410
  ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards
  ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC"
  ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI"
  ...

11 years agoMerge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Thu, 2 May 2013 15:56:55 +0000 (08:56 -0700)]
Merge tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC non-critical fixes from Olof Johansson:
 "Here is a collection of fixes (and some intermixed cleanups) that were
  considered less important and thus not included in the later parts of
  the 3.9-rc cycle.

  It's a bit all over the map, contents wise.  A series of ux500 fixes
  and cleanups, a bunch of various fixes for OMAP and tegra, and some
  for Freescale i.MX and even Qualcomm MSM.

  Note that there's also a patch on this branch to globally turn off
  -Wmaybe-uninitialized when building with -Os.  It's been posted
  several times by Arnd and no dissent was raised, but nobody seemed
  interested to pick it up.  So here it is, as the topmost patch."

* tag 'fixes-nc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (70 commits)
  Turn off -Wmaybe-uninitialized when building with -Os
  ARM: orion5x: include linux/cpu.h
  ARM: tegra: call cpu_do_idle from C code
  ARM: u300: fix ages old copy/paste bug
  ARM: OMAP2+: add dependencies on ARCH_MULTI_V6/V7
  ARM: tegra: solve adr range issue with THUMB2_KERNEL enabled
  ARM: tegra: fix relocation truncated error when THUMB2_KERNEL enabled
  ARM: tegra: fix build error when THUMB2_KERNEL enabled
  ARM: msm: Fix uncompess.h tx underrun check
  ARM: vexpress: Remove A9 PMU compatible values for non-A9 platforms
  ARM: cpuimx27 and mbimx27: prepend CONFIG_ to Kconfig macro
  ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS"
  ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD"
  ARM: mach-imx: mach-imx6q: Fix sparse warnings
  ARM: mach-imx: src: Include "common.h
  ARM: mach-imx: gpc: Include "common.h"
  ARM: mach-imx: avic: Staticize *avic_base
  ARM: mach-imx: tzic: Staticize *tzic_base
  ARM: mach-imx: clk: Include "clk.h"
  ARM: mach-imx: clk-busy: Staticize clk_busy_mux_ops
  ...

11 years agoMerge commit '8700c95adb03' into timers/nohz
Frederic Weisbecker [Thu, 2 May 2013 15:37:49 +0000 (17:37 +0200)]
Merge commit '8700c95adb03' into timers/nohz

The full dynticks tree needs the latest RCU and sched
upstream updates in order to fix some dependencies.

Merge a common upstream merge point that has these
updates.

Conflicts:
include/linux/perf_event.h
kernel/rcutree.h
kernel/rcutree_plugin.h

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
11 years agodrm/radeon: fix handling of v6 power tables
Alex Deucher [Wed, 1 May 2013 18:34:54 +0000 (14:34 -0400)]
drm/radeon: fix handling of v6 power tables

The code was mis-handling variable sized arrays.

Reported-by: Sylvain BERTRAND <sylware@legeek.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
11 years agoipc_schedule_free() can do vfree() directly now
Al Viro [Mon, 29 Apr 2013 16:42:09 +0000 (12:42 -0400)]
ipc_schedule_free() can do vfree() directly now

Commit 32fcfd40715e ("make vfree() safe to call from interrupt
contexts") made it safe to do vfree directly from the RCU callback,
which allows us to simplify ipc/util.c a lot by getting rid of the
differences between vmalloc/kmalloc memory.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agonet: Restore NETIF_F_* bit ordering.
David Miller [Thu, 2 May 2013 08:31:32 +0000 (04:31 -0400)]
net: Restore NETIF_F_* bit ordering.

Commit 8ad227ff89a7 ("net: vlan: add 802.1ad support") added some new
NETIF_F_* features bits, but it added them in the middle of existing
values.

Userland depends upon the flag bits via the per-netdevice 'flags' sysfs
file.

So restore the previous ordering by adding the new flags at the end.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agodrm/radeon: clarify family checks in pm table parsing
Alex Deucher [Mon, 29 Apr 2013 14:51:26 +0000 (10:51 -0400)]
drm/radeon: clarify family checks in pm table parsing

We actually care about the chip family rather than the
DCE version although functionally they are the same.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: consolidate UVD clock programming
Christian König [Mon, 29 Apr 2013 09:55:02 +0000 (11:55 +0200)]
drm/radeon: consolidate UVD clock programming

Instead of duplicating the code over and over again, just use a single
function to handle the clock calculations.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: fix UPLL_REF_DIV_MASK definition
Christian König [Mon, 29 Apr 2013 08:20:23 +0000 (10:20 +0200)]
drm/radeon: fix UPLL_REF_DIV_MASK definition

Stupid copy & paste error over all generations.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoradeon: add bo tracking debugfs
Jerome Glisse [Fri, 26 Apr 2013 02:29:27 +0000 (22:29 -0400)]
radeon: add bo tracking debugfs

This is to allow debugging of userspace program not freeing buffer
after, which is basicly a memory leak. This print the list of all
gem object along with their size and placement (VRAM,GTT,CPU) and
with the pid of the task that created them.

agd5f: add warning fix

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: add new richland pci ids
Alex Deucher [Thu, 25 Apr 2013 18:06:05 +0000 (14:06 -0400)]
drm/radeon: add new richland pci ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
11 years agodrm/radeon: add some new SI PCI ids
Alex Deucher [Thu, 25 Apr 2013 17:55:15 +0000 (13:55 -0400)]
drm/radeon: add some new SI PCI ids

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
11 years agodrm/radeon: fix scratch reg handling for UVD fence
Christian König [Wed, 24 Apr 2013 12:11:09 +0000 (14:11 +0200)]
drm/radeon: fix scratch reg handling for UVD fence

Also init the scratch reg to zero on the UVD ring.
This fixes UVD on AGP based cards.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: allocate SA bo in the requested domain
Christian König [Thu, 25 Apr 2013 16:19:08 +0000 (18:19 +0200)]
drm/radeon: allocate SA bo in the requested domain

This avoid moving the BO directly after allocating it.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: fix possible segfault when parsing pm tables
Alex Deucher [Thu, 25 Apr 2013 13:29:17 +0000 (09:29 -0400)]
drm/radeon: fix possible segfault when parsing pm tables

If we have a empty power table, bail early and allocate
the default power state.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=63865

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
11 years agodrm/radeon: fix endian bugs in atom_allocate_fb_scratch()
Alex Deucher [Wed, 24 Apr 2013 18:39:31 +0000 (14:39 -0400)]
drm/radeon: fix endian bugs in atom_allocate_fb_scratch()

Reviwed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
11 years agoKVM: PPC: Book3S: Add API for in-kernel XICS emulation
Paul Mackerras [Sat, 27 Apr 2013 00:28:37 +0000 (00:28 +0000)]
KVM: PPC: Book3S: Add API for in-kernel XICS emulation

This adds the API for userspace to instantiate an XICS device in a VM
and connect VCPUs to it.  The API consists of a new device type for
the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which
functions similarly to KVM_CAP_IRQ_MPIC, and the KVM_IRQ_LINE ioctl,
which is used to assert and deassert interrupt inputs of the XICS.

The XICS device has one attribute group, KVM_DEV_XICS_GRP_SOURCES.
Each attribute within this group corresponds to the state of one
interrupt source.  The attribute number is the same as the interrupt
source number.

This does not support irq routing or irqfd yet.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
11 years agokvm/ppc/mpic: fix missing unlock in set_base_addr()
Wei Yongjun [Wed, 1 May 2013 19:17:31 +0000 (19:17 +0000)]
kvm/ppc/mpic: fix missing unlock in set_base_addr()

Add the missing unlock before return from function set_base_addr()
when disables the mapping.

Introduced by commit 5df554ad5b7522ea62b0ff9d5be35183494efc21
(kvm/ppc/mpic: in-kernel MPIC emulation)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Alexander Graf <agraf@suse.de>
11 years agokvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write
Scott Wood [Fri, 26 Apr 2013 14:53:39 +0000 (14:53 +0000)]
kvm/ppc: Hold srcu lock when calling kvm_io_bus_read/write

These functions do an srcu_dereference without acquiring the srcu lock
themselves.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
11 years agokvm/ppc/mpic: remove users
Scott Wood [Tue, 30 Apr 2013 14:57:14 +0000 (14:57 +0000)]
kvm/ppc/mpic: remove users

This is an unused (no pun intended) leftover from when this code did
reference counting.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
11 years agokvm/ppc/mpic: fix mmio region lists when multiple guests used
Scott Wood [Tue, 30 Apr 2013 14:57:13 +0000 (14:57 +0000)]
kvm/ppc/mpic: fix mmio region lists when multiple guests used

Keeping a linked list of statically defined objects doesn't work
very well when we have multiple guests. :-P

Switch to an array of constant objects.  This fixes a hang when
multiple guests are used.

Signed-off-by: Scott Wood <scottwood@freescale.com>
[agraf: remove struct list_head from mem_reg]
Signed-off-by: Alexander Graf <agraf@suse.de>
11 years agoARM: 7709/1: mcpm: Add explicit AFLAGS to support v6/v7 multiplatform kernels
Dave Martin [Thu, 2 May 2013 10:38:10 +0000 (11:38 +0100)]
ARM: 7709/1: mcpm: Add explicit AFLAGS to support v6/v7 multiplatform kernels

The full mcpm layer is not likely to be relevant to v6 based
platforms, so a multiplatform kernel won't use that code if booted
on v6 hardware.

This patch modifies the AFLAGS for affected mcpm .S files to
specify armv7-a explicitly for that code.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agovhost_scsi: module rename
Michael S. Tsirkin [Thu, 2 May 2013 00:52:59 +0000 (03:52 +0300)]
vhost_scsi: module rename

Rename module and update Kconfig and Makefile.
Add alias for compatibility with old userspace
scripts if any.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Asias He <asias@redhat.com>
Acked-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agotcm_vhost: header split up
Michael S. Tsirkin [Thu, 2 May 2013 00:50:34 +0000 (03:50 +0300)]
tcm_vhost: header split up

move uapi parts to vhost.h
move .c private parts to .c itself

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Asias He <asias@redhat.com>
Acked-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agovhost: src file renames
Michael S. Tsirkin [Thu, 2 May 2013 00:37:38 +0000 (03:37 +0300)]
vhost: src file renames

Move tcm_vhost.c -> scsi.c

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Asias He <asias@redhat.com>
Acked-by: Nicholas Bellinger <nab@linux-iscsi.org>
11 years agoOMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found
Tomi Valkeinen [Mon, 29 Apr 2013 10:08:32 +0000 (13:08 +0300)]
OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found

If the I2C adapter needed by the TFP410 device is not available yet,
return EPROBE_DEFER so that the device will get probed again.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: VENC: Add error handling for venc_probe_pdata
Tomi Valkeinen [Thu, 2 May 2013 09:19:54 +0000 (12:19 +0300)]
OMAPDSS: VENC: Add error handling for venc_probe_pdata

Add proper error handling for venc_probe_pdata(). This will cause
EPROBE_DEFER to be properly passed upwards, causing the VENC driver to be
probed again later if a resource was missing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: Add error handling for hdmi_probe_pdata
Tomi Valkeinen [Fri, 26 Apr 2013 11:52:23 +0000 (14:52 +0300)]
OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata

Add proper error handling for hdmi_probe_pdata(). This will cause
EPROBE_DEFER to be properly passed upwards, causing the HDMI driver to be
probed again later if a resource was missing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: RFBI: Add error handling for rfbi_probe_pdata
Tomi Valkeinen [Thu, 2 May 2013 09:15:31 +0000 (12:15 +0300)]
OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata

Add proper error handling for rfbi_probe_pdata(). This will cause
EPROBE_DEFER to be properly passed upwards, causing the RFBI driver to be
probed again later if a resource was missing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DSI: Add error handling for dsi_probe_pdata
Tomi Valkeinen [Fri, 26 Apr 2013 10:47:41 +0000 (13:47 +0300)]
OMAPDSS: DSI: Add error handling for dsi_probe_pdata

Add proper error handling for dsi_probe_pdata(). This will cause
EPROBE_DEFER to be properly passed upwards, causing the DSI driver to be
probed again later if a resource was missing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: SDI: Add error handling for sdi_probe_pdata
Tomi Valkeinen [Thu, 2 May 2013 09:10:37 +0000 (12:10 +0300)]
OMAPDSS: SDI: Add error handling for sdi_probe_pdata

Add proper error handling for sdi_probe_pdata(). This will cause
EPROBE_DEFER to be properly passed upwards, causing the SDI driver to be
probed again later if a resource was missing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DPI: Add error handling for dpi_probe_pdata
Tomi Valkeinen [Fri, 26 Apr 2013 11:33:05 +0000 (14:33 +0300)]
OMAPDSS: DPI: Add error handling for dpi_probe_pdata

Add proper error handling for dpi_probe_pdata(). This will cause
EPROBE_DEFER to be properly passed upwards, causing the DPI driver to be
probed again later if a resource was missing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: VENC: use platform_driver_register()
Tomi Valkeinen [Thu, 2 May 2013 09:18:20 +0000 (12:18 +0300)]
OMAPDSS: VENC: use platform_driver_register()

Use platform_driver_register() instead of platform_driver_probe() so
that we can support EPROBE_DEFER.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: HDMI: use platform_driver_register()
Tomi Valkeinen [Fri, 26 Apr 2013 11:48:43 +0000 (14:48 +0300)]
OMAPDSS: HDMI: use platform_driver_register()

Use platform_driver_register() instead of platform_driver_probe() so
that we can support EPROBE_DEFER.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: RFBI: use platform_driver_register()
Tomi Valkeinen [Thu, 2 May 2013 09:11:56 +0000 (12:11 +0300)]
OMAPDSS: RFBI: use platform_driver_register()

Use platform_driver_register() instead of platform_driver_probe() so
that we can support EPROBE_DEFER.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DSI: use platform_driver_register()
Tomi Valkeinen [Fri, 26 Apr 2013 10:47:06 +0000 (13:47 +0300)]
OMAPDSS: DSI: use platform_driver_register()

Use platform_driver_register() instead of platform_driver_probe() so
that we can support EPROBE_DEFER.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: SDI: use platform_driver_register()
Tomi Valkeinen [Thu, 2 May 2013 08:56:35 +0000 (11:56 +0300)]
OMAPDSS: SDI: use platform_driver_register()

Use platform_driver_register() instead of platform_driver_probe() so
that we can support EPROBE_DEFER.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DPI: use platform_driver_register()
Tomi Valkeinen [Fri, 26 Apr 2013 11:27:44 +0000 (14:27 +0300)]
OMAPDSS: DPI: use platform_driver_register()

Use platform_driver_register() instead of platform_driver_probe() so
that we can support EPROBE_DEFER.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPFB: defer probe if no displays
Tomi Valkeinen [Fri, 26 Apr 2013 10:40:36 +0000 (13:40 +0300)]
OMAPFB: defer probe if no displays

omapfb requires the panel drivers to have been probed when omapfb is
initialized. omapfb does not support insertion of new panels after its
probe. This causes a problem in case omapdss or the panel probes have
been deferred due to EPROBE_DEFER error, as omapfb won't find any
displays.

As a quick fix, this patch changes the omapfb probe so that if omapfb
does not find any displays, it'll return EPROBE_DEFER. This is not
perfect, as with a board with no displays, omapfb will get deferred
forever. Also, if the board has multiple displays, but only some of them
have been probed, omapfb will start and leave the unprobed displays out.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPFB: use module_platform_driver()
Tomi Valkeinen [Fri, 26 Apr 2013 10:40:25 +0000 (13:40 +0300)]
OMAPFB: use module_platform_driver()

Instead of using platform_driver_probe(), use module_platform_driver()
so that we can support deferred probing.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: Makefile: move omapfb after panels
Tomi Valkeinen [Fri, 26 Apr 2013 10:35:50 +0000 (13:35 +0300)]
OMAPDSS: Makefile: move omapfb after panels

omapfb requires the panels to have been probed before omapfb's probe. We
currently manage that by having omapfb in late initcall level. However,
a much simpler way is to just change the makefile so that omapfb is
after the panel drivers.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoOMAPDSS: DPI: fix compilation if DSI not compiled in
Tomi Valkeinen [Thu, 18 Apr 2013 09:16:39 +0000 (12:16 +0300)]
OMAPDSS: DPI: fix compilation if DSI not compiled in

Commit 100c826235793345efe06b3558cc9d36166b1e26 (OMAPDSS: DPI: use new
clock calculation code) breaks dpi.c compilation if DSI is not enabled
in the kernel configuration.

Fix compilation by adding dummy inline functions for the ones that dpi.c
references. The functions will never be called, as dpi.c knows that
there is no DSI device available.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
11 years agoMerge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Thu, 2 May 2013 07:33:25 +0000 (17:33 +1000)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

Add GK110 modesetting suport.

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nve0: recognise nvf0 as a kepler board (GK110)
  drm/nouveau: force noaccel when no PFIFO support present
  drm/nvf0/disp: expose display class 2.2

11 years agodrm/nve0: recognise nvf0 as a kepler board (GK110)
Ben Skeggs [Sat, 30 Mar 2013 12:21:54 +0000 (22:21 +1000)]
drm/nve0: recognise nvf0 as a kepler board (GK110)

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: force noaccel when no PFIFO support present
Ben Skeggs [Thu, 2 May 2013 06:20:44 +0000 (16:20 +1000)]
drm/nouveau: force noaccel when no PFIFO support present

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvf0/disp: expose display class 2.2
Ben Skeggs [Sat, 30 Mar 2013 12:31:25 +0000 (22:31 +1000)]
drm/nvf0/disp: expose display class 2.2

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/cirrus: deal with bo reserve fail in dirty update path
Dave Airlie [Thu, 2 May 2013 06:45:02 +0000 (02:45 -0400)]
drm/cirrus: deal with bo reserve fail in dirty update path

Port over the mgag200 fix to cirrus as it suffers the same issue.

    On F19 testing, it was noticed we get a lot of errors in dmesg
    about being unable to reserve the buffer when plymouth starts,
    this is due to the buffer being in the process of migrating,
    so it makes sense we can't reserve it.

    In order to deal with it, this adds delayed updates for the dirty
    updates, when the bo is unreservable, in the normal console case
    this shouldn't ever happen, its just when plymouth or X is
    pushing the console bo to system memory.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/ast: deal with bo reserve fail in dirty update path
Dave Airlie [Thu, 2 May 2013 06:40:25 +0000 (02:40 -0400)]
drm/ast: deal with bo reserve fail in dirty update path

Port over the mgag200 fix to ast as it suffers the same issue.

    On F19 testing, it was noticed we get a lot of errors in dmesg
    about being unable to reserve the buffer when plymouth starts,
    this is due to the buffer being in the process of migrating,
    so it makes sense we can't reserve it.

    In order to deal with it, this adds delayed updates for the dirty
    updates, when the bo is unreservable, in the normal console case
    this shouldn't ever happen, its just when plymouth or X is
    pushing the console bo to system memory.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/mgag200: deal with bo reserve fail in dirty update path
Dave Airlie [Thu, 2 May 2013 04:52:01 +0000 (00:52 -0400)]
drm/mgag200: deal with bo reserve fail in dirty update path

On F19 testing, it was noticed we get a lot of errors in dmesg
about being unable to reserve the buffer when plymouth starts,
this is due to the buffer being in the process of migrating,
so it makes sense we can't reserve it.

In order to deal with it, this adds delayed updates for the dirty
updates, when the bo is unreservable, in the normal console case
this shouldn't ever happen, its just when plymouth or X is
pushing the console bo to system memory.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Thu, 2 May 2013 00:51:54 +0000 (17:51 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull VFS updates from Al Viro,

Misc cleanups all over the place, mainly wrt /proc interfaces (switch
create_proc_entry to proc_create(), get rid of the deprecated
create_proc_read_entry() in favor of using proc_create_data() and
seq_file etc).

7kloc removed.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
  don't bother with deferred freeing of fdtables
  proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
  proc: Make the PROC_I() and PDE() macros internal to procfs
  proc: Supply a function to remove a proc entry by PDE
  take cgroup_open() and cpuset_open() to fs/proc/base.c
  ppc: Clean up scanlog
  ppc: Clean up rtas_flash driver somewhat
  hostap: proc: Use remove_proc_subtree()
  drm: proc: Use remove_proc_subtree()
  drm: proc: Use minor->index to label things, not PDE->name
  drm: Constify drm_proc_list[]
  zoran: Don't print proc_dir_entry data in debug
  reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
  proc: Supply an accessor for getting the data from a PDE's parent
  airo: Use remove_proc_subtree()
  rtl8192u: Don't need to save device proc dir PDE
  rtl8187se: Use a dir under /proc/net/r8180/
  proc: Add proc_mkdir_data()
  proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
  proc: Move PDE_NET() to fs/proc/proc_net.c
  ...

11 years agopowerpc: Fix build error for book3e
Aneesh Kumar K.V [Tue, 30 Apr 2013 20:26:08 +0000 (20:26 +0000)]
powerpc: Fix build error for book3e

We moved the definition of shift_to_mmu_psize and mmu_psize_to_shift
out of hugetlbpage.c in patch "powerpc: New hugepage directory format".

These functions are not related to hugetlbpage and we want to use them
outside hugetlbpage.c We missed a definition for book3e when we moved
these functions. Add similar functions to mmu-book3e.h

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Context switch the new EBB SPRs
Michael Ellerman [Tue, 30 Apr 2013 20:17:04 +0000 (20:17 +0000)]
powerpc: Context switch the new EBB SPRs

This context switches the new Event Based Branching (EBB) SPRs.  The three new
SPRs are:
  - Event Based Branch Handler Register (EBBHR)
  - Event Based Branch Return Register (EBBRR)
  - Branch Event Status and Control Register (BESCR)

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Turn on the EBB H/FSCR bits
Michael Neuling [Tue, 30 Apr 2013 20:17:03 +0000 (20:17 +0000)]
powerpc: Turn on the EBB H/FSCR bits

This turns Event Based Branching (EBB) on in the Hypervisor Facility Status and
Control Register (HFSCR) and Facility Status and Control Register (FSCR).

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Replace CPU_FTR_BCTAR with CPU_FTR_ARCH_207S
Michael Ellerman [Tue, 30 Apr 2013 20:17:02 +0000 (20:17 +0000)]
powerpc: Replace CPU_FTR_BCTAR with CPU_FTR_ARCH_207S

We are getting low on cpu feature bits. So rather than add a separate bit for
every new Power8 feature, add a bit for arch 2.07 server catagory and use that
instead.

Hijack the value we had for BCTAR, but swap the value with CFAR so that all the
ARCH defines are together.

Note we don't touch CPU_FTR_TM, because it is conditionally enabled if
the kernel is built with TM support.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Setup BHRB instructions facility in HFSCR for POWER8
Anshuman Khandual [Thu, 25 Apr 2013 20:54:55 +0000 (20:54 +0000)]
powerpc: Setup BHRB instructions facility in HFSCR for POWER8

Make BHRB instructions available in problem and privileged states.

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Fix interrupt range check on debug exception
Bharat Bhushan [Mon, 29 Apr 2013 22:18:11 +0000 (22:18 +0000)]
powerpc: Fix interrupt range check on debug exception

We do not want to take single step and branch-taken debug exception
in kernel exception code. But the address range check was not covering
all kernel exception handlers address range.

With this patch we defined the interrupt_end label which defines the
end on kernel exception code. So now we check interrupt_base to
interrupt_end range for not handling debug exception in kernel
exception entry.

Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoMerge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 1 May 2013 22:51:46 +0000 (15:51 -0700)]
Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86/efi changes from Peter Anvin:
 "The bulk of these changes are cleaning up the efivars handling and
  breaking it up into a tree of files.  There are a number of fixes as
  well.

  The entire changeset is pretty big, but most of it is code movement.

  Several of these commits are quite new; the history got very messed up
  due to a mismerge with the urgent changes for rc8 which completely
  broke IA64, and so Ingo requested that we rebase it to straighten it
  out."

* 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi: remove "kfree(NULL)"
  efi: locking fix in efivar_entry_set_safe()
  efi, pstore: Read data from variable store before memcpy()
  efi, pstore: Remove entry from list when erasing
  efi, pstore: Initialise 'entry' before iterating
  efi: split efisubsystem from efivars
  efivarfs: Move to fs/efivarfs
  efivars: Move pstore code into the new EFI directory
  efivars: efivar_entry API
  efivars: Keep a private global pointer to efivars
  efi: move utf16 string functions to efi.h
  x86, efi: Make efi_memblock_x86_reserve_range more readable
  efivarfs: convert to use simple_open()

11 years agolinkage.h: fix build breakage due to symbol prefix handling
James Hogan [Wed, 1 May 2013 21:04:17 +0000 (22:04 +0100)]
linkage.h: fix build breakage due to symbol prefix handling

Al's commit e1b5bb6d1236 ("consolidate cond_syscall and SYSCALL_ALIAS
declarations") broke the build on blackfin and metag due to the
following code:

  #ifndef SYMBOL_NAME
  #ifdef CONFIG_SYMBOL_PREFIX
  #define SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX ## x
  #else
  #define SYMBOL_NAME(x) x
  #endif
  #endif
  #define __SYMBOL_NAME(x) __stringify(SYMBOL_NAME(x))

__stringify literally stringifies CONFIG_SYMBOL_PREFIX ##x, so you get
lines like this in kernel/sys_ni.s:

  .weak CONFIG_SYMBOL_PREFIXsys_quotactl
  .set CONFIG_SYMBOL_PREFIXsys_quotactl,CONFIG_SYMBOL_PREFIXsys_ni_syscall

The patches in Rusty's modules-next tree such as "CONFIG_SYMBOL_PREFIX:
cleanup." cleans up the whole mess around symbol prefixes, so this patch
just attempts to fix the build in the meantime.

The intermediate definition of SYMBOL_NAME above isn't used and is
incorrect when CONFIG_SYMBOL_PREFIX is defined as CONFIG_SYMBOL_PREFIX
is a quoted string literal, so define __SYMBOL_NAME directly depending
on CONFIG_SYMBOL_PREFIX.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Mea-culpa-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agodon't bother with deferred freeing of fdtables
Al Viro [Mon, 29 Apr 2013 01:42:33 +0000 (21:42 -0400)]
don't bother with deferred freeing of fdtables

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoMerge branch 'vfree' into for-next
Al Viro [Wed, 1 May 2013 21:31:27 +0000 (17:31 -0400)]
Merge branch 'vfree' into for-next

11 years agoproc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
David Howells [Thu, 11 Apr 2013 12:34:43 +0000 (13:34 +0100)]
proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h

Move non-public declarations and definitions from linux/proc_fs.h to
fs/proc/internal.h.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoproc: Make the PROC_I() and PDE() macros internal to procfs
David Howells [Fri, 12 Apr 2013 17:03:36 +0000 (18:03 +0100)]
proc: Make the PROC_I() and PDE() macros internal to procfs

Make the PROC_I() and PDE() macros internal to procfs.  This means making
PDE_DATA() out of line.  This could be made more optimal by storing
PDE()->data into inode->i_private.

Also provide a __PDE_DATA() that is inline and internal to procfs.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoproc: Supply a function to remove a proc entry by PDE
David Howells [Fri, 12 Apr 2013 16:27:28 +0000 (17:27 +0100)]
proc: Supply a function to remove a proc entry by PDE

Supply a function (proc_remove()) to remove a proc entry (and any subtree
rooted there) by proc_dir_entry pointer rather than by name and (optionally)
root dir entry pointer.  This allows us to eliminate all remaining pde->name
accesses outside of procfs.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Grant Likely <grant.likely@linaro.or>
cc: linux-acpi@vger.kernel.org
cc: openipmi-developer@lists.sourceforge.net
cc: devicetree-discuss@lists.ozlabs.org
cc: linux-pci@vger.kernel.org
cc: netdev@vger.kernel.org
cc: netfilter-devel@vger.kernel.org
cc: alsa-devel@alsa-project.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agotake cgroup_open() and cpuset_open() to fs/proc/base.c
Al Viro [Sat, 20 Apr 2013 03:11:24 +0000 (23:11 -0400)]
take cgroup_open() and cpuset_open() to fs/proc/base.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoppc: Clean up scanlog
David Howells [Fri, 12 Apr 2013 17:54:43 +0000 (18:54 +0100)]
ppc: Clean up scanlog

Clean up the pseries scanlog driver's use of procfs:

 (1) Don't need to save the proc_dir_entry pointer as we have the filename to
     remove with.

 (2) Save the scan log buffer pointer in a static variable (there is only one
     of it) and don't save it in the PDE (which doesn't have a destructor).

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
cc: Paul Mackerras <paulus@samba.org>
cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agoppc: Clean up rtas_flash driver somewhat
David Howells [Fri, 12 Apr 2013 23:48:49 +0000 (00:48 +0100)]
ppc: Clean up rtas_flash driver somewhat

Clean up some of the problems with the rtas_flash driver:

 (1) It shouldn't fiddle with the internals of the procfs filesystem (altering
     pde->count).

 (2) If pid namespaces are in effect, then you can get multiple inodes
     connected to a single pde, thereby rendering the pde->count > 2 test
     useless.

 (3) The pde->count fudging doesn't work for forked, dup'd or cloned file
     descriptors, so add static mutexes and use them to wrap access to the
     driver through read, write and release methods.

 (4) The driver can only handle one device, so allocate most of the data
     previously attached to the pde->data as static variables instead (though
     allocate the validation data buffer with kmalloc).

 (5) We don't need to save the pde pointers as long as we have the filenames
     available for removal.

 (6) Don't try to multiplex what the update file read method does based on the
     filename.  Instead provide separate file ops and split the function.

Whilst we're at it, tabulate the procfile information and loop through it when
creating or destroying them rather than manually coding each one.

[Folded fixes from Vasant Hegde <hegdevasant@linux.vnet.ibm.com>]

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
cc: Paul Mackerras <paulus@samba.org>
cc: Anton Blanchard <anton@samba.org>
cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
11 years agohostap: proc: Use remove_proc_subtree()
David Howells [Fri, 12 Apr 2013 15:20:47 +0000 (16:20 +0100)]
hostap: proc: Use remove_proc_subtree()

Use remove_proc_subtree() rather than remove_proc_entry() to remove a
device-specific proc directory and all its children.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jouni Malinen <j@w1.fi>
cc: Johannes Berg <johannes@sipsolutions.net>
cc: linux-wireless@vger.kernel.org
cc: devel@driverdev.osuosl.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>