]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
8 years agosparc64:block/sunvdc: Renamed bio variable name from req to bio
Vijay Kumar [Mon, 23 Jan 2017 17:53:03 +0000 (09:53 -0800)]
sparc64:block/sunvdc: Renamed bio variable name from req to bio

Changed bio variable name from req to bio for better readability.
This is just a cosmetic change.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Orabug: 25128265
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64:block/sunvdc: Added io stats accounting for bio based vdisk
Vijay Kumar [Wed, 18 Jan 2017 16:10:12 +0000 (08:10 -0800)]
sparc64:block/sunvdc: Added io stats accounting for bio based vdisk

As vdisk now bypass block layer and directly submits IO, iostats does
not get accounted (which happens at block). Added IO accounting at bio
layer for vdisk block device.

Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Orabug: 25128265
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Remove node restriction from PRIQ MSI assignments
chris hyser [Wed, 15 Mar 2017 17:51:34 +0000 (10:51 -0700)]
sparc64: Remove node restriction from PRIQ MSI assignments

The current design of PRIQ only allows MSI routing to CPUs within the same
I/O node. At best this prevents certain types of CPU add/removals as well
as various affinity assignments and at worst can result in dropped
interrupts with CPU DR.

This prior design used a per-node hash table with collision chain (and RCU
synchronization) shared among the root complexes. While it would be
possible to support moving these records between the node hash tables this
is needlessly complicated when a single global table could be used instead
assuming the hashing mechanism was modified to limit the potential for
performance degradation through potentially longer collision chains and
more lookups.

The new design for MSI uses the bottom N bits of the device handle as a
hash versus hashing device handle and msidata together as before. This
exploits the existing numbering scheme to result in zero collisions (even
in an exactly sized hash table). If the numbering scheme is changed on a
future system, that system will still be functional though presumably
with some performance loss. The MSI data is then used as an index into a
array as has been done for prior linux sun4v interrupt model support. Given
the very small number of INTX interrupts, their handling remains
essentially unchanged (now uses a single global hash table, versus per I/O
node as before).

MSI Interrupts from Hypervisor data to ISR:

                                     struct pci_pbm_info *pbms[MAX_PBMS];
                                             +-----------+
                                             |           |
  From Hypervisor:                           |           |
                                             +-----------+
  - root complex devhandle  +---/HASH/------>|           |
  - msidata +--+                             |           |-------+
               |                             +-----------+       |
               |                             |           |       |
               |                             |           |       |
               |                             +-----------+       |
               |                             |           |       |
               |                             |           |       |
               |                             +-----------+       |
               |                                                 |
               |           struct pci_pbm_info                   |
               |              +-----------+<---------------------+
               |              |           |
               |              |    PBM    |
               |              |           |
               |              |           |---+
               |              |           |   |
               |              |           |   |
+--------------+              +-----------+   |
|                                             |
| struct priq_irq **msi_priq                  |
|    +-------------+<-------------------------+
|    |             |
|    |             |
+--->+-------------+       struct priq_irq
     |             |-------->+---------+
     |             |         |         |
     +-------------+         |         |
     |             |         +---------+
     |             |         |   irq   | generic_handle_irq(irq)
     +-------------+         +---------+
     |             |
     |             |
     +-------------+

Signed-off-by: Chris Hyser <chris.hyser@oracle.com>
Reviewed-by Thomas Tai <thomas.tai@oracle.com>

Orabug: 25110748
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoblk-mq: Clean up all_q_list on request_queue deletion
chris hyser [Fri, 3 Mar 2017 21:24:22 +0000 (13:24 -0800)]
blk-mq: Clean up all_q_list on request_queue deletion

Entries were not being removed from all_q_list when corresponding request
queue structs were freed with subsequent embedded list pointers being
trashed when the queue memory was re-allocated. Additionally, due to use of
cached allocation pool (kmem_cache_alloc_node), the same data structure
would be reinserted into the same list twice which cannot work given the
kernel linked list implementation.

Signed-off-by: Chris Hyser <chris.hyser@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Orabug: 25569331
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: kern_addr_valid regression
bob picco [Fri, 10 Mar 2017 19:31:19 +0000 (14:31 -0500)]
sparc64: kern_addr_valid regression

Orabug: 25860542

I encountered this bug when using /proc/kcore to examine the kernel. Plus a
coworker inquired about debugging tools. We computed pa but did
not use it during the maximum physical address bits test. Instead we used
the identity mapped virtual address which will always fail this test.

I believe the defect came in here:
[bpicco@zareason linus.git]$ git describe --contains bb4e6e85daa52
v3.18-rc1~87^2~4
.

Signed-off-by: Bob Picco <bob.picco@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoMerge branch topic/uek-4.1/sparc of git://ca-git.us.oracle.com/linux-uek into uek...
Chuck Anderson [Fri, 5 May 2017 16:57:23 +0000 (09:57 -0700)]
Merge branch topic/uek-4.1/sparc of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/sparc: (32 commits)
  sparc64: Detect DAX ra+pgsz when hvapi minor doesn't indicate it
  sparc64: DAX memory will use RA+PGSZ feature in HV
  sparc64: Disable DAX flow control
  sparc64: Add DAX hypervisor services
  sparc64: DAX memory needs persistent mappings
  sparc64: Fix incorrect error print in DAX driver when validating ccb
  sparc64: DAX request for non 4MB memory should return with unique errno
  Revert "sparc64: DAX request for non 4MB memory should return with unique errno"
  sparc64: DAX request to mmap non 4MB memory should fail with a debug print
  sparc64: DAX request for non 4MB memory should return with unique errno
  sparc64: Incorrect print by DAX driver when old driver API is used
  sparc64: DAX request to dequeue half of a long CCB should not succeed
  sparc64: dax_overflow_check reports incorrect data
  sparc64: Ignored DAX ref count causes lockup
  sparc64: disable dax page range checking on RA
  sparc64: Oracle Data Analytics Accelerator (DAX) driver
  sparc64: fix an issue when trying to bring hotplug cpus online
  sparc64: Fix memory corruption when THP is enabled
  sparc64: Fix address range for page table free Orabug: 25704426
  sparc64: Add support for 2G hugepages
  ...

8 years agosparc64: Detect DAX ra+pgsz when hvapi minor doesn't indicate it
Rob Gardner [Tue, 25 Apr 2017 18:04:00 +0000 (12:04 -0600)]
sparc64: Detect DAX ra+pgsz when hvapi minor doesn't indicate it

Orabug: 25911008

The RA+PGSZ HV API feature is detected via a controlled experiment.
The experiment constructs a small DAX request and places the output
buffer at the very end of an 8k page. Then it checks to see if the 8k
page boundary was honored, and if so, then we've got the ability to pass
the page size along with a real address. Once the HV API minor number
is bumped to 1, this will be the primary method of detection.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Jonathan Helman <jonathan.helman@oracle.com>
(cherry picked from commit 013d5b9909e804817dcd939f50f242f09237feac)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: DAX memory will use RA+PGSZ feature in HV
Rob Gardner [Fri, 21 Apr 2017 23:10:34 +0000 (17:10 -0600)]
sparc64: DAX memory will use RA+PGSZ feature in HV

Orabug: 25911008
Orabug: 25931417

The reported kernel panics and "other oddities" are caused by
corruption of kernel memory by DAX output. This is happening due to an
apparent change between UEK2 and UEK4, whereby the underlying h/w page
size for memory acquired via kmalloc has changed. UEK2 used 4mb pages,
which the dax driver used to limit the output from the coprocessor,
who refuses to cross "page boundaries". But in UEK4 it appears that a
more intelligent approach to memory is used, and kernel memory may be
backed by a variety of huge h/w page sizes, ie, 256mb and 2gb. This
now allows DAX to produce output up to this much larger page size,
thus going beyond the actual allocation.  We do not have any way to
kmalloc memory with a certain backing page size, and we cannot feed
DAX a virtual address if we are not certain of its page size.

Recent hypervisor f/w has provided a powerful new feature: the ability
to convey page size bits along with a real address (RA). This gives us
the opportunity to avoid using the TLB/TSB as a parameter passing
mechanism and we can use this to avoid using virtual addresses at all
in a DAX ccb. We now use this mechanism to set the page size for
dax_alloc memory to 4mb even if the underlying h/w page size for the
memory is much larger. Memory allocated by the application via
conventional methods is not affected.

This HV feature is available on M7 f/w with minor number 1, so this is
used to determine if the driver can provide the memory allocation
service. If the feature is not available, DAX will still work, but all
the responsibility for memory allocation falls back to the
application.

The sudden ENOACCESS errors are a result of another hypervisor change.
Newest HV firmware has begun to enforce the privileged flag (bit 14)
in arg2 of the ccb_submit hypercall. This flag is described in the API
wiki as "CCB virtual addresses are treated as privileged" and in the
VM spec as "Virtual addresses within CCBs are translated in privileged
context".  The explanation given later in the VM spec is that if a CCB
contains any virtual address whose TTE has the priv bit set
(_PAGE_P_4V), then the priv flag in the ccb_submit api must also be
set, or else the hypervisor will refuse to perform the translation,
and an ENOACCESS error will be thrown. Since privileged virtual
addresses are no longer used as a result of this very commit, this
problem simply disappears.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Jonathan Helman <jonathan.helman@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Disable DAX flow control
Rob Gardner [Wed, 19 Apr 2017 17:21:13 +0000 (11:21 -0600)]
sparc64: Disable DAX flow control

Orabug: 25997202

The flow control feature of DAX only works for output buffers
and it doesn't appear to be possible to calculate the exact
size in bytes of an input buffer. So we have no way to bound
the amount of data that DAX reads as input. This has correctness
and security implications, so until we figure out something better
to do, the temporary workaround is to disable flow control completely
and fall back to 4Mb virtual page backed dax_alloc memory, which
will allow page boundaries to limit the size of all buffers.  A new
module parameter "flow_enable" is provided to allow this decision
to be reverted at module load time if needed.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Jonathan Helman <jonathan.helman@oracle.com>
Reviewed-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Add DAX hypervisor services
Allen Pais [Fri, 5 May 2017 05:51:32 +0000 (11:21 +0530)]
sparc64: Add DAX hypervisor services

This provides the HV API for coprocessor services which
is needed to support a device driver for the DAX.

Orabug: 25996411

Reviewed-by: Bob Picco <bob.picco@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoMerge branch topic/uek-4.1/upstream-cherry-picks of git://ca-git.us.oracle.com/linux...
Chuck Anderson [Wed, 26 Apr 2017 22:56:11 +0000 (15:56 -0700)]
Merge branch topic/uek-4.1/upstream-cherry-picks of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/upstream-cherry-picks:
  KVM: VMX: fix vmwrite to invalid VMCS

8 years agoKVM: VMX: fix vmwrite to invalid VMCS
Radim Krčmář [Fri, 3 Jul 2015 13:49:28 +0000 (15:49 +0200)]
KVM: VMX: fix vmwrite to invalid VMCS

fpu_activate is called outside of vcpu_load(), which means it should not
touch VMCS, but fpu_activate needs to.  Avoid the call by moving it to a
point where we know that the guest needs eager FPU and VMCS is loaded.

This will get rid of the following trace

 vmwrite error: reg 6800 value 0 (err 1)
  [<ffffffff8162035b>] dump_stack+0x19/0x1b
  [<ffffffffa046c701>] vmwrite_error+0x2c/0x2e [kvm_intel]
  [<ffffffffa045f26f>] vmcs_writel+0x1f/0x30 [kvm_intel]
  [<ffffffffa04617e5>] vmx_fpu_activate.part.61+0x45/0xb0 [kvm_intel]
  [<ffffffffa0461865>] vmx_fpu_activate+0x15/0x20 [kvm_intel]
  [<ffffffffa0560b91>] kvm_arch_vcpu_create+0x51/0x70 [kvm]
  [<ffffffffa0548011>] kvm_vm_ioctl+0x1c1/0x760 [kvm]
  [<ffffffff8118b55a>] ? handle_mm_fault+0x49a/0xec0
  [<ffffffff811e47d5>] do_vfs_ioctl+0x2e5/0x4c0
  [<ffffffff8127abbe>] ? file_has_perm+0xae/0xc0
  [<ffffffff811e4a51>] SyS_ioctl+0xa1/0xc0
  [<ffffffff81630949>] system_call_fastpath+0x16/0x1b

(Note: we also unconditionally activate FPU in vmx_vcpu_reset(), so the
 removed code added nothing.)

Fixes: c447e76b4cab ("kvm/fpu: Enable eager restore kvm FPU for MPX")
Cc: <stable@vger.kernel.org>
Reported-by: Vlastimil Holer <vlastimil.holer@gmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 370777daab3f024f1645177039955088e2e9ae73)
OraBug: 25956028
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
8 years agoMerge branch topic/uek-4.1/dtrace of git://ca-git.us.oracle.com/linux-uek into uek...
Chuck Anderson [Tue, 25 Apr 2017 21:56:34 +0000 (14:56 -0700)]
Merge branch topic/uek-4.1/dtrace of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/dtrace:
  dtrace: fix handling of save_stack_trace sentinel (x86 only)
  dtrace: DTrace walltime lock-free implementation

8 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Chuck Anderson [Tue, 25 Apr 2017 21:55:47 +0000 (14:55 -0700)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/drivers:
  Revert "i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter"

8 years agoRevert "i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter"
Brian Maly [Mon, 10 Apr 2017 23:04:40 +0000 (19:04 -0400)]
Revert "i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter"

Orabug: 25877447

This reverts commit 690e746888bf9a307845d00fbac02bcfd2157fa2.
This fixes dhcp on OL7 under KVM.

Signed-off-by: Brian Maly <brian.maly@oracle.com>
8 years agosparc64: DAX memory needs persistent mappings
Rob Gardner [Thu, 13 Apr 2017 18:07:59 +0000 (12:07 -0600)]
sparc64: DAX memory needs persistent mappings

Orabug: 25888596

Memory allocated on behalf of dax_alloc() is mapped by two
distinct MMU translations, one set for userland, which is backed by
regular 8k virtual pages, and another set for feeding to the
hypervisor, and these are kernel virtual addresses backed
by 4Mb pages. These latter translations are only used when
the memory is allocated/deallocated and when a dax transaction
is submitted. So the translations are unlikely to be in the TLB,
and eventually may be evicted from the kernel TSB after some time.
This leads to ENOMAP errors reported by the hypervisor. In order
to avoid this, we "touch" such pages just before dax_submit
which will fault translations into the tlb/tsb if necessary.

A future performance optimization is to take advantage of the "real
address has pagesize" feature which is available in very recent
versions of hypervisor f/w. In this case we can convert the address
in the ccb to a real address with the correct bits to specify
a 4Mb pagesize, and change the address type to real. Then the
memory touch would be unnecessary and the HV would not need to
probe the tlb/tsb at all.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Jonathan Helman <jonathan.helman@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Fix incorrect error print in DAX driver when validating ccb
Sanath Kumar [Fri, 14 Apr 2017 03:00:04 +0000 (22:00 -0500)]
sparc64: Fix incorrect error print in DAX driver when validating ccb

Orabug: 25835254

This fixes an incorrect stringification in a macro that prints
invalid address type in a CCB.

Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: DAX request for non 4MB memory should return with unique errno
Sanath Kumar [Mon, 10 Apr 2017 21:52:32 +0000 (16:52 -0500)]
sparc64: DAX request for non 4MB memory should return with unique errno

Orabug:25852910

With this change libdax can detect that mmap failed due to lack of flow
control in DAX HW and it can proceed with dax_subpage allocation.

Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoRevert "sparc64: DAX request for non 4MB memory should return with unique errno"
Allen Pais [Fri, 14 Apr 2017 10:38:55 +0000 (16:08 +0530)]
Revert "sparc64: DAX request for non 4MB memory should return with unique errno"

This reverts commit c835e602d654df4753cc25bacfd2e3ae023fbc23.

Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: DAX request to mmap non 4MB memory should fail with a debug print
Sanath Kumar [Thu, 6 Apr 2017 20:27:34 +0000 (15:27 -0500)]
sparc64: DAX request to mmap non 4MB memory should fail with a debug print

Orabug:25852910

When the dax flow control is disabled, dax_alloc_mem(...) only allows 4MB
allocation in the driver. Any other requests are reported as an error
with an error print to the kernel log. We now have a dax subpage
allocator in libdax which gets triggered when the driver reports the
above said failure. In other words it is a normal use case for the driver
to report this. So make this a debug print.

Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: DAX request for non 4MB memory should return with unique errno
Sanath Kumar [Mon, 10 Apr 2017 21:52:32 +0000 (16:52 -0500)]
sparc64: DAX request for non 4MB memory should return with unique errno

Orabug:25852910

With this change libdax can detect that mmap failed due to lack of flow
control in DAX HW and it can proceed with dax_subpage allocation.

Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Incorrect print by DAX driver when old driver API is used
Sanath Kumar [Mon, 10 Apr 2017 20:42:38 +0000 (15:42 -0500)]
sparc64: Incorrect print by DAX driver when old driver API is used

Orabug: 25835133

If an old dax driver API is used, it is the driver API version
that is old, irrespective of the libdax version.

Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: DAX request to dequeue half of a long CCB should not succeed
Sanath Kumar [Wed, 5 Apr 2017 04:56:49 +0000 (23:56 -0500)]
sparc64: DAX request to dequeue half of a long CCB should not succeed

Orabug: 25827254

When a dequeue call is made to the driver such that the last CCB in the
request is the first half of a long ccb, the driver does not report an
error and releases the BIP buffer for the CCBs dequeued up until then.
This was detected by a ioctl_test23 written by Stanislav specifically to
validate the above scenario.

This bug fix addresses both the above issues.

Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: dax_overflow_check reports incorrect data
Sanath Kumar [Tue, 4 Apr 2017 05:14:42 +0000 (00:14 -0500)]
sparc64: dax_overflow_check reports incorrect data

Orabug: 25820395

The range reported for a page overflow is incorrect when
the address is page_size aligned. Add 1 to the address so
that it always reports the next page_size boundary.

Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Ignored DAX ref count causes lockup
Rob Gardner [Mon, 10 Apr 2017 19:24:48 +0000 (13:24 -0600)]
sparc64: Ignored DAX ref count causes lockup

Orabug: 25870705

The dax_mm structure has a reference count that respresents
the number of dax_vma structures that point to it. The reference
count is duly incremented and decremented each time memory is
allocated via the dax_alloc/mmap path. However, the reference
count is never used for its intended purpose, which is to
prevent the dax_mm structure from being freed while there
are references to it. The result of this is that if dax_free
is called after the process's dax_mm is cleaned up, the dax_vma
will have a reference to the freed object, leading to panics
due to null pointers and/or lockups due to inalid spinlock state.
Code changed to actually check the reference count before freeing
a dax_mm.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: disable dax page range checking on RA
Rob Gardner [Wed, 5 Apr 2017 18:33:01 +0000 (12:33 -0600)]
sparc64: disable dax page range checking on RA

Orabug: 25820812

This fix is to address a hypervisor f/w change which affects
T7 machines with 3.0 cpu and T8 machines. Newer HV f/w
pays attention to the page size field in real addresses.
This is not a bug; I asked them to implement this long ago.
A value of zero here means 8k, so RA buffers are restricted
to one page when running on newer firmware. The PRM defines a page
size of 0xF to mean "disable page range checking". We set this
value for all real addresses. Old f/w will overwrite this field
anyway, so it's safe for us to always set it.

Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Reviewed-by: Jonathan Helman <jonathan.helman@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Oracle Data Analytics Accelerator (DAX) driver
Sanath Kumar [Wed, 29 Mar 2017 17:46:42 +0000 (12:46 -0500)]
sparc64: Oracle Data Analytics Accelerator (DAX) driver

Orabug: 23072809

DAX is a coprocessor which resides on the SPARC M7 processor chip, and
has direct access to the CPU's L3 caches as well as physical
memory. It can perform several operations on data streams with
various input and output formats.  The driver is merely a transport
mechanism and does not have knowledge of the various opcodes and data
formats. A user space library provides high level services and
translates these into low level commands which are then passed into
the driver and subsequently the hypervisor and the coprocessor.

See Documentation/sparc/dax.txt for more details.

Reviewed-by: Jonathan Helman <jonathan.helman@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: David Aldridge <david.j.aldridge@oracle.com>
Reviewed-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Signed-off-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: fix an issue when trying to bring hotplug cpus online
Dave Aldridge [Fri, 24 Mar 2017 12:01:00 +0000 (06:01 -0600)]
sparc64: fix an issue when trying to bring hotplug cpus online

When booting the kernel with maxcpus= on the command line
and then subsequently trying to bring cpus online using:

echo 1 > /sys/devices/system/cpu/cpu[n]/online

messages of the form:

ldom_startcpu_cpuid: sun4v_cpu_start() gives error 6
Processor[n] is stuck

were being reported on the console.

This commit fixes this issue by ensuring that any cpus not
booted during initial kernel boot are explicitly stopped.
This then allows them to be successfully brought online later
if required.

Orabug: 25667277

Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Allen Pais <allen.pais@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Fix memory corruption when THP is enabled
Nitin Gupta [Mon, 3 Apr 2017 22:32:28 +0000 (15:32 -0700)]
sparc64: Fix memory corruption when THP is enabled

The memory corruption was happening due to incorrect
TLB/TSB flushing of hugepages.

Orabug: 25704426

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Fix address range for page table free Orabug: 25704426
Nitin Gupta [Fri, 24 Mar 2017 20:06:22 +0000 (13:06 -0700)]
sparc64: Fix address range for page table free Orabug: 25704426

Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Add support for 2G hugepages
Nitin Gupta [Fri, 24 Feb 2017 00:54:20 +0000 (16:54 -0800)]
sparc64: Add support for 2G hugepages

Orabug: 25704426

Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Fix size check in huge_pte_alloc
Nitin Gupta [Fri, 3 Mar 2017 19:29:20 +0000 (11:29 -0800)]
sparc64: Fix size check in huge_pte_alloc

Orabug: 25704426

Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Fix build error in flush_tsb_user_page
Nitin Gupta [Fri, 3 Mar 2017 19:04:00 +0000 (11:04 -0800)]
sparc64: Fix build error in flush_tsb_user_page

Patch "sparc64: Add 64K page size support"
unconditionally used __flush_huge_tsb_one_entry()
which is available only when hugetlb support is
enabled.

Another issue was incorrect TSB flushing for 64K
pages in flush_tsb_user().

Orabug: 25704426

Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Add 64K page size support
Nitin Gupta [Wed, 1 Mar 2017 20:23:38 +0000 (12:23 -0800)]
sparc64: Add 64K page size support

Orabug: 25704426

Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Remove xl-hugepages and add multi-page size
Allen Pais [Tue, 18 Apr 2017 08:10:44 +0000 (13:40 +0530)]
sparc64: Remove xl-hugepages and add multi-page size
 support

with several fixes from Bob Picco.

Orabug: 25704426

Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: do not dequeue stale VDS IO work entries
Jag Raman [Wed, 22 Mar 2017 19:36:01 +0000 (15:36 -0400)]
sparc64: do not dequeue stale VDS IO work entries

This change ensures that stale (ones that are marked to be dropped) VDS IO
work entries are not dequeued.

Orabug: 25455138

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-by: Jack Schwartz <jack.schwartz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoSPARC64: Virtual Disk Device (vdsdev) Read-Only Option (options=ro) not working
George Kennedy [Wed, 22 Mar 2017 17:39:32 +0000 (13:39 -0400)]
SPARC64: Virtual Disk Device (vdsdev) Read-Only Option (options=ro) not working

Add read-only (options=ro) support to virtual disk server (VDS).

Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Reviewed-by: Alexandre Chartre <Alexandre.Chartre@oracle.com>
Orabug: 23623853
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoarch/sparc: Fix FPU register corruption with AES crypto test on M7
Babu Moger [Tue, 7 Mar 2017 22:19:55 +0000 (14:19 -0800)]
arch/sparc: Fix FPU register corruption with AES crypto test on M7

We noticed crypto key corruption while running AES crypto tests
with M7 memcpy changes. Investigating further, we found that this
was the same problem reported previously with NG4memcpy. The commit
f4da3628dc7c ("sparc64: Fix FPU register corruption with AES crypto
offload") fixes the problem. Ported these changes to M7memcpy.

Orabug: 25265878

Signed-off-by: Babu Moger <babu.moger@oracle.com>
Tested-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: xoff not needed when removing port link
Shannon Nelson [Tue, 14 Mar 2017 17:24:43 +0000 (10:24 -0700)]
sunvnet: xoff not needed when removing port link

The sunvnet netdev is connected to the controlling ldom's vswitch
for network bridging.  However, for higher performance between ldoms,
there also is a channel between each client ldom.  These connections are
represented in the sunvnet driver by a queue for each ldom.  The driver
uses select_queue to tell the stack which queue to use by tracking the mac
addresses on the other end of each port.  When a connected ldom shuts down,
the driver receives an LDC_EVENT_RESET and the port is removed from the
driver, thus a queue with no ldom on the other end will never be selected
for Tx.

The driver was trying to reinforce the "don't use this queue" notion with
netif_tx_stop_queue() and netif_tx_wake_queue(), which really should only
be used to signal a Tx queue is full (aka XOFF).  This misuse of queue
state resulted in NETDEV WATCHDOG messages and lots of unnecessary calls
into the driver's tx_timeout handler.  Simply removing these takes care
of the problem.

Orabug: 25190537

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry-picked from commit 9c5a3a1f9388100d4b03e85faf0cce8264985302)

Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: count multicast packets
Shannon Nelson [Tue, 14 Mar 2017 17:24:42 +0000 (10:24 -0700)]
sunvnet: count multicast packets

Make sure multicast packets get counted in the device.

Orabug: 25190537

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry-picked from commit b12a96f5cd04583f45a1b6554b8f3786b26db913)

Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: track port queues correctly
Shannon Nelson [Tue, 14 Mar 2017 17:24:41 +0000 (10:24 -0700)]
sunvnet: track port queues correctly

Track our used and unused queue indexies correctly.  Otherwise, as ports
dropped out and returned, they all eventually ended up with the same
queue index.

Orabug: 25190537

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry-picked from commit e1f1e5f711265ee9d881afd12ff252b2d01e1174)

Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: add stats to track ldom to ldom packets and bytes
Shannon Nelson [Tue, 14 Mar 2017 17:24:40 +0000 (10:24 -0700)]
sunvnet: add stats to track ldom to ldom packets and bytes

In this driver, there is a "port" created for the connection to each of
the other ldoms; a netdev queue is mapped to each port, and they are
collected under a single netdev.  The generic netdev statistics show
us all the traffic in and out of our network device, but don't show
individual queue/port stats.  This patch breaks out the traffic counts
for the individual ports and gives us a little view into the state of
those connections.

Orabug: 25190537

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry-picked from commit 0f512c84544b9a8f8de53b6f4bc0c372c45d8693)

Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoldmvsw: better use of link up and down on ldom vswitch
Shannon Nelson [Tue, 14 Mar 2017 17:24:39 +0000 (10:24 -0700)]
ldmvsw: better use of link up and down on ldom vswitch

When an ldom VM is bound, the network vswitch infrastructure is set up for
it, but was being forced 'UP' by the userland switch configuration script.
When 'UP' but not actually connected to a running VM, the ipv6 neighbor
probes fail (not a horrible thing) and start cluttering up the kernel logs.
Funny thing: these are debug messages that never actually show up, but
we do see the net_ratelimited messages that say N callbacks were
suppressed.

This patch defers the netif_carrier_on() until an actual link has been
established with the VM, as indicated by receiving an LDC_EVENT_UP from
the underlying LDC protocol.  Similarly, we take the link down when we
see the LDC_EVENT_RESET.  Now when we see the ndo_open(), we reset the
link to get things talking again.

Orabug: 25525312

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry-picked from commit 867fa150f8f7ee6e9e5a9ab768e2d0dc675a968b)

Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoMerge branch topic/uek-4.1/sparc of git://ca-git.us.oracle.com/linux-uek into uek...
Chuck Anderson [Thu, 6 Apr 2017 07:17:44 +0000 (00:17 -0700)]
Merge branch topic/uek-4.1/sparc of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/sparc: (28 commits)
  megaraid: Fix unaligned warning
  sparc64: Restrict number of processes
  SPARC64: vds_blk_rw() does not handle drives with q->limits.chunk_sectors > 0
  sparc64: Improve boot time by per cpu map update
  arch/sparc: memblock resizes are not handled properly
  SPARC64: LDOM vnet "Got unexpected MCAST reply"
  ldmvsw: disable tso and gso for bridge operations
  ldmvsw: update and simplify version string
  sunvnet: remove extra rcu_read_unlocks
  sunvnet: straighten up message event handling logic
  sunvnet: add memory barrier before check for tx enable
  sunvnet: update version and version printing
  sunvnet: remove unused variable in maybe_tx_wakeup
  sunvnet: make sunvnet common code dynamically loadable
  hwrng: n2 - update version info
  hwrng: n2 - support new hardware register layout
  hwrng: n2 - add device data descriptions
  hwrng: n2 - limit error spewage when self-test fails
  hwrng: n2 - Attach on T5/M5, T7/M7 SPARC CPUs
  tcp: fix tcp_fastopen unaligned access complaints on sparc
  ...

8 years agomegaraid: Fix unaligned warning
Allen Pais [Wed, 29 Mar 2017 08:51:58 +0000 (14:21 +0530)]
megaraid: Fix unaligned warning

The MegaRAID userland descriptor structures do not properly align
pointers on their natural boundaries. This causes warnings to be issued
when storcli or the SNMP daemon are in use.

Quiesce the warning until the user-kernel interface has been fixed.

Orabug: 24817799

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 069af368ac74dc0130f91836b9f85f7cd5b18749)
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Restrict number of processes
Sanath Kumar [Fri, 9 Dec 2016 20:26:09 +0000 (14:26 -0600)]
sparc64: Restrict number of processes

Orabug: 24523680

If the number of processes exceeds the number of supported context IDs
then there are random segfaults seen in the user programs.

The data collected when debugging this bug showed that two processes
with the same context IDs were present in the TLB shared between them
thus resulting in incorrect translations. Since the bug occurs after the
kernel hits the max context ID supported by the processor, the context
wraparound code found in get_new_mmu_context(...) and
smp_new_mmu_context_version_client(...) are under suspicion.

The plan is that this will get fixed when we implement "context domain"
feature for sparc in the kernel.  For now this patch temporarily
restricts the number of processes allowed by the kernel based on the
number of context IDs supported by the processor. This way we never reach
that condition of having incorrect translations.

For non root users fork will fail if the number of existing processes is
greater than (max_user_nctx - 100). Where max_user_nctx is the maximum
number of context IDs supported by the processor. For root user the fork
will fail if the the number of existing processes reaches max_user_nctx.
Extra context IDs are given to root to recover the system if users reach
their limit and cannot recover the system (i.e cannot even execute
'kill' to reduce the number of processes).

Signed-off-by: Sanath Kumar <sanath.s.kumar@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoSPARC64: vds_blk_rw() does not handle drives with q->limits.chunk_sectors > 0
George Kennedy [Wed, 15 Feb 2017 20:17:58 +0000 (15:17 -0500)]
SPARC64: vds_blk_rw() does not handle drives with q->limits.chunk_sectors > 0

Drives with q->limits.chunk_sectors > 0 are not properly handled by
vds_blk_rw(). Drives such as NVME set chunk_sectors to indicate a performance
boundary (see call to blk_queue_chunk_sectors() in nvme_alloc_ns()). Currently,
when vds_blk_rw() calls bio_add_page() and the chunk_sectors boundary would be
crossed, bio_add_page() returns zero and vds_blk_rw() fails with -EIO.

The proposed fix now adds an additional check to vds_blk_rw() when
bio_add_page() returns zero that checks for bio->bi_iter.bi_size != 0. If
bi_size != 0, it indicates that a page or pages have been successfully added by
bio_add_page(). When this added condition has been hit, exit the for loop in
vds_blk_rw() and submit the outstanding IOs and continue.

Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Reviewed-By: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-By: Liam Merwick <Liam.Merwick@oracle.com>
Orabug: 25373818
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Improve boot time by per cpu map update
Atish Patra [Mon, 13 Feb 2017 02:32:58 +0000 (19:32 -0700)]
sparc64: Improve boot time by per cpu map update

Currently, smp_fill_in_sib_core_maps is invoked during cpu_up to setup
all the core/sibling map correctly. This happens in the order of O(n^2)
as it iterates over all the online cpus twice when each cpu comes online.
This increases smp_init() execution time exponentially leading to a
higher boot time.

Optimize the code path by comparing only the current cpu with online
cpus and set the maps for both the cpus simultaneously. Take this
opportunity to merge all three for loops into one as well. Here is
the smp_init() time after and before the fix.

Number of cpus:    before fix: after the fix:
512    2.30s .283s
1024    14.23s .493s

Orabug: 25496463

Signed-off-by: Atish Patra <atish.patra@oracle.com>
Reviewed-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Allen Pais <allen.pais@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoarch/sparc: memblock resizes are not handled properly
Pavel Tatashin [Wed, 8 Feb 2017 21:02:39 +0000 (16:02 -0500)]
arch/sparc: memblock resizes are not handled properly

In add_node_ranges() when memblock resize happens, the iterator keeps using
the previous freed array. This bug cause hangs on machine where there are
over 128 memory blocks during boot. For example, on machines where memory
interleaving is small.
The problem is seen on T4-4 because it cant have 2T of memory, and memory
is  interleaved at 8G. So we have 2T/8G = 256 regions to set node IDs. The
starting size of regions array is 128. Thus, we have to double at least one
time (actually we have to double twice because some memory is already
reserved and thus we need more than 256 regions). We start using an
incorrect pointer to the array after the first doubling.

Orabug: 25415396

Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Babu Moger <babu.moger@oracle.com>
Reviewed-by: Babu Moger <babu.moger@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoSPARC64: LDOM vnet "Got unexpected MCAST reply"
George Kennedy [Wed, 8 Feb 2017 01:37:37 +0000 (20:37 -0500)]
SPARC64: LDOM vnet "Got unexpected MCAST reply"

Handle unexpected MCAST reply as a debug warning the same as is done in
Solaris 12.  Please see bug 24954702 for details.

Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Orabug: 24954702
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoldmvsw: disable tso and gso for bridge operations
Shannon Nelson [Mon, 13 Feb 2017 18:57:04 +0000 (10:57 -0800)]
ldmvsw: disable tso and gso for bridge operations

The ldmvsw driver is specifically for supporting the ldom virtual
networking by running in the primary ldom and using the LDC to connect
the remaining ldoms to the outside world via a bridge.  With TSO and GSO
supported while connected the bridge, things tend to misbehave as seen
in our case by delayed packets, enough to begin triggering retransmits
and affecting overall throughput.  By turning off advertised support for
TSO and GSO we restore stable traffic flow through the bridge.

Orabug: 23293104

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit bc221a34ac473b444a7cfdd0c152b4c71f79326b)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoldmvsw: update and simplify version string
Shannon Nelson [Mon, 13 Feb 2017 18:57:03 +0000 (10:57 -0800)]
ldmvsw: update and simplify version string

New version and simplify the print code.

Orabug: 23293104

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 7602011f59cc32ebc3a5f9058d6ba11b096c8c50)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: remove extra rcu_read_unlocks
Shannon Nelson [Mon, 13 Feb 2017 18:57:02 +0000 (10:57 -0800)]
sunvnet: remove extra rcu_read_unlocks

The RCU read lock is grabbed first thing in sunvnet_start_xmit_common()
so it always needs to be released.  This removes the conditional release
in the dropped packet error path and removes a couple of superfluous
calls in the middle of the code.

Orabug: 23293104

Reported-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit daa86e50f649fccadafc53994ddc4254d75a008b)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: straighten up message event handling logic
Shannon Nelson [Mon, 13 Feb 2017 18:57:01 +0000 (10:57 -0800)]
sunvnet: straighten up message event handling logic

The use of gotos for handling the incoming events made this code
harder to read and support than it should be.  This patch straightens
out and clears up the logic.

Orabug: 23293104

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit bf091f3f362b3c562a18bbf7a2d3e2f3a36eba1d)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: add memory barrier before check for tx enable
Shannon Nelson [Mon, 13 Feb 2017 18:57:00 +0000 (10:57 -0800)]
sunvnet: add memory barrier before check for tx enable

In order to allow the underlying LDC and outstanding memory operations
to potentially catch up with the driver's Tx requests, add a memory
barrier before checking again for available tx descriptors.

Orabug: 23293104

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit fd263fb6e718c5bdf35cbc1de4f781c71794d2a4)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: update version and version printing
Shannon Nelson [Mon, 13 Feb 2017 18:56:59 +0000 (10:56 -0800)]
sunvnet: update version and version printing

There have been several changes since the first version of this code, so
we bump the version number.  While we're at it, we can simplify the
version printing a bit and drop a couple lines of code.

Orabug: 23293104

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit f2f3e210bffe5c8f8b30d0b0c7b0f733ff5db334)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: remove unused variable in maybe_tx_wakeup
Sowmini Varadhan [Mon, 13 Feb 2017 18:56:58 +0000 (10:56 -0800)]
sunvnet: remove unused variable in maybe_tx_wakeup

The vio_dring_state *dr variable is unused in maybe_tx_wakeup().
As the comments indicate, we call maybe_tx_wakeup() whenever we
get a STOPPED LDC message on the port. If the queue is stopped,
we want to wake it up so that we will send another START message
at the next TX and trigger the consumer to drain the dring.

Orabug: 23293104

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit d4aa89cc2bbe021722c946eb11b21ebb0f13c825)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvnet: make sunvnet common code dynamically loadable
Shannon Nelson [Mon, 13 Feb 2017 18:56:57 +0000 (10:56 -0800)]
sunvnet: make sunvnet common code dynamically loadable

When the sunvnet_common code was split out for use by both sunvnet
and the newer ldmvsw, it was made into a static kernel library, which
limits the usefulness of sunvnet and ldmvsw as loadables, since most
of the real work is being done in the shared code.  Also, this is
simply dead code in kernels that aren't running the LDoms.

This patch makes the sunvnet_common into a dynamically loadable
module and makes sunvnet and ldmvsw dependent on sunvnet_common.

Orabug: 23293104

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 2493b842f258e14938f278e44ecc26970dfabbf0)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agohwrng: n2 - update version info
Shannon Nelson [Thu, 12 Jan 2017 18:52:49 +0000 (10:52 -0800)]
hwrng: n2 - update version info

Orabug: 25127795

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 0ff1436fb2e3da085f7177d03ce4362c45b75d57)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agohwrng: n2 - support new hardware register layout
Shannon Nelson [Thu, 12 Jan 2017 18:52:48 +0000 (10:52 -0800)]
hwrng: n2 - support new hardware register layout

Add the new register layout constants and the requisite logic
for using them.

Orabug: 25127795

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 07e25d43be8502bd8ab6122c4f6449ebf30e98f7)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agohwrng: n2 - add device data descriptions
Shannon Nelson [Thu, 12 Jan 2017 18:52:47 +0000 (10:52 -0800)]
hwrng: n2 - add device data descriptions

Since we're going to need to keep track of more than just one
attribute of the hardware, we'll change the use of the data field
from the match struct from a single flag to a struct pointer.
This patch adds the struct template and initial descriptions.

Orabug: 25127795

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit becbc4940ad8e8ff560e1ceee33d9bb4fe4c9225)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agohwrng: n2 - limit error spewage when self-test fails
Shannon Nelson [Thu, 12 Jan 2017 18:52:46 +0000 (10:52 -0800)]
hwrng: n2 - limit error spewage when self-test fails

If the self-test fails, it probably won't actually suddenly
start working.  Currently, this causes an endless spew of
error messages on the console and in the logs, so this patch
adds a limiter to the test.

Orabug: 25127795

Reported-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit db602a7f940a71870c17e39bcbe4e4d7a4a8273e)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agohwrng: n2 - Attach on T5/M5, T7/M7 SPARC CPUs
Anatoly Pugachev [Mon, 25 Jan 2016 21:19:02 +0000 (00:19 +0300)]
hwrng: n2 - Attach on T5/M5, T7/M7 SPARC CPUs

n2rng: Attach on T5/M5, T7/M7 SPARC CPUs

(space to tab fixes after variable names)

Orabug: 25127795

Signed-off-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit c1e9b3b0eea12899b7749571af21cc60822cf2b6)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agotcp: fix tcp_fastopen unaligned access complaints on sparc
Shannon Nelson [Thu, 12 Jan 2017 22:24:58 +0000 (14:24 -0800)]
tcp: fix tcp_fastopen unaligned access complaints on sparc

Fix up a data alignment issue on sparc by swapping the order
of the cookie byte array field with the length field in
struct tcp_fastopen_cookie, and making it a proper union
to clean up the typecasting.

This addresses log complaints like these:
    log_unaligned: 113 callbacks suppressed
    Kernel unaligned access at TPC[976490] tcp_try_fastopen+0x2d0/0x360
    Kernel unaligned access at TPC[9764ac] tcp_try_fastopen+0x2ec/0x360
    Kernel unaligned access at TPC[9764c8] tcp_try_fastopen+0x308/0x360
    Kernel unaligned access at TPC[9764e4] tcp_try_fastopen+0x324/0x360
    Kernel unaligned access at TPC[976490] tcp_try_fastopen+0x2d0/0x360

Orabug: 25163405

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 003c941057eaa868ca6fedd29a274c863167230d)
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agovds: Add physical block support
Liam R. Howlett [Tue, 31 Jan 2017 20:34:08 +0000 (12:34 -0800)]
vds: Add physical block support

Version 1.2 of the virtual IO device protocol added physical block
support.  Start sending the underlaying physical block device size.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Rob Gardner <rob.gardner@oracle.com>
Orabug: 19420123
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Add missing hardware capabilities for M7
Dave Aldridge [Fri, 17 Feb 2017 15:00:38 +0000 (07:00 -0800)]
sparc64: Add missing hardware capabilities for M7

Some M7 hardware capabilities were not being reported
correctly. This commit fixes the issue by adding definitions
for all the missing capabilities from both the Machine
Descriptor and the Compatibility Feature Register.

Orabug: 25555746

Signed-off-by: Dave Aldridge <david.j.aldridge@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoSPARC64: Fix vds_vtoc_set_default debug with large disks
George Kennedy [Fri, 24 Feb 2017 15:13:43 +0000 (10:13 -0500)]
SPARC64: Fix vds_vtoc_set_default debug with large disks

Fix vds_vtoc_set_default debug, which breaks with large capacity drives (i.e. 1.6TB).

Signed-off-by: George Kennedy <george.kennedy@oracle.com>
Reviewed-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Orabug: 25423802
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: VDC threads in guest domain do not resume after primary domain reboot
Jag Raman [Tue, 7 Mar 2017 21:41:31 +0000 (16:41 -0500)]
sparc64: VDC threads in guest domain do not resume after primary domain reboot

Prevents VDC threads from hanging while waiting for primary
domain to come back up. Ensures that all waiting VDC threads
are woken up when primary domain comes back up.

Orabug: 25519961

Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosunvdc: Add support for setting physical sector size
Liam R. Howlett [Wed, 1 Feb 2017 19:09:26 +0000 (14:09 -0500)]
sunvdc: Add support for setting physical sector size

Physical sector size is supported in v1.2 of the vDisk protocol and
should be set if available.  If protocol version 1.2 is used and the
physical disk size is unavailable, then the disk is considered busy.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(Cherry-pick of upstream f41e54616ca1a199f6c17228f26082ccdaaab3de)

Orabug: 19420123
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: create/destroy cpu sysfs dynamically
Atish Patra [Wed, 1 Mar 2017 02:18:26 +0000 (19:18 -0700)]
sparc64: create/destroy cpu sysfs dynamically

Currently, cpu/cpuX represents maximum number of possible
cpus in a domain. Those cpu sysfs directories also does
not change as we add/remove cpus via ldom manager.

Update sysfs so that it represents number of present cpus
in the domain. As a result, cpu sysfs is also updated
dynamically upon cpu add/removal.

Orabug: 21775890
Orabug: 25216469

Before the fix:
[root@ca-sparc76 ~]# ldm list
NAME             STATE      FLAGS   CONS VCPU  MEMORY UTIL  NORM  UPTIME
primary          active     -n-cv-  UART 32    32G    0.2%  0.2%  11m

[root@ca-sparc76 ~]# getconf _NPROCESSORS_CONF
512
[root@ca-sparc76 ~]# ldm set-vcpu 64 primary
[root@ca-sparc76 ~]# ldm list
NAME             STATE      FLAGS   CONS VCPU  MEMORY UTIL  NORM  UPTIME
primary          active     -n-cv-  UART 64    32G    0.0%  0.0%  12m
[root@ca-sparc76 ~]# getconf _NPROCESSORS_CONF
512
-------------------------------------------------------------------------
After the fix:
[root@ca-sparc76 ~]# getconf _NPROCESSORS_CONF
32
[root@ca-sparc76 ~]# ldm set-vcpu 64 primary
[root@ca-sparc76 ~]# ldm list
NAME             STATE      FLAGS   CONS  VCPU  MEMORY UTIL  NORM  UPTIME
primary          active     -n-cv-  UART  64    32G    0.0%  0.0%  12m
[root@ca-sparc76 ~]# getconf _NPROCESSORS_CONF
64

Signed-off-by: Atish Patra <atish.patra@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Thomas Tai <thomas.tai@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Do not retain old VM_SPARC_ADI flag when protection changes on page
Khalid Aziz [Tue, 7 Mar 2017 18:26:10 +0000 (11:26 -0700)]
sparc64: Do not retain old VM_SPARC_ADI flag when protection changes on page

When protection on a memory page is changed with mprotect(), old
arch-specific VM flags on the page are retained. This patch clears
old VM_SPARC_ADI flag when protection is changed since mprotect() is
potentially being invoked to disable ADI on the page. This code will
add VM_SPARC_ADI flag back if the new protection includes it.

Orabug: 25641371

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agoSPARC64: VIO: Support for virtual-device MD node probing
Aaron Young [Fri, 17 Feb 2017 23:18:53 +0000 (18:18 -0500)]
SPARC64: VIO: Support for virtual-device MD node probing

This update adds support to the mdesc/vio infrastructure to
probe for "virtual-device" nodes in the MD. The vio
module will create sysfs device files for these nodes which
can be accessed by user space code (such as udev). In addition,
VIO drivers can now probe for these MD nodes if the need arises.

This functionality will serve as part of the fix for
BUG 24841906.

Signed-off-by: Aaron Young <Aaron.Young@oracle.com>
Reviewed-By: Alexandre Chartre <Alexandre.Chartre@oracle.com>
Orabug: 24841906

8 years agodtrace: fix handling of save_stack_trace sentinel (x86 only)
Kris Van Hees [Mon, 3 Apr 2017 12:18:53 +0000 (08:18 -0400)]
dtrace: fix handling of save_stack_trace sentinel (x86 only)

On x86 only, when save_stack_trace() writes less stack frames to the
buffer than there is space for, a ULONG_MAX is added as sentinel.  The
DTrace code was mistakenly treating the buffer as always ending with a
ULONG_MAX.

Orabug: 25727046
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
8 years agodtrace: DTrace walltime lock-free implementation
Tomas Jedlicka [Thu, 30 Mar 2017 13:22:47 +0000 (09:22 -0400)]
dtrace: DTrace walltime lock-free implementation

DTrace walltimestamp is now based on reading current kernel
timespec without taking locks.

Orabug: 25715256

Signed-off-by: Tomas Jedlicka <tomas.jedlicka@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
8 years agoMerge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek...
Chuck Anderson [Sun, 26 Mar 2017 23:08:32 +0000 (16:08 -0700)]
Merge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/ofed:
  net/mlx4_core: Disallow creation of RAW QPs on a VF

8 years agonet/mlx4_core: Disallow creation of RAW QPs on a VF
Eli Cohen [Wed, 22 Feb 2017 21:55:10 +0000 (15:55 -0600)]
net/mlx4_core: Disallow creation of RAW QPs on a VF

This is considered a security breach since RAW QPs, implemented using
MLX transport QPs, can send any message they wish to.

Orabug: 257846022

Tested-by: Pierre Orzechowski <pierre.e.orzechowski@oracle.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
8 years agoMerge branch topic/uek-4.1/rpm-build of git://ca-git.us.oracle.com/linux-uek into...
Chuck Anderson [Thu, 23 Mar 2017 17:56:15 +0000 (10:56 -0700)]
Merge branch topic/uek-4.1/rpm-build of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/rpm-build:
  Add the PCI Host driver into the UEK config files

8 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Chuck Anderson [Thu, 23 Mar 2017 17:55:33 +0000 (10:55 -0700)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/drivers:
  PCI: hv: Microsoft changes in support of RHEL and UEK4

8 years agoPCI: hv: Microsoft changes in support of RHEL and UEK4
Jake Oshins [Fri, 3 Mar 2017 07:28:52 +0000 (23:28 -0800)]
PCI: hv: Microsoft changes in support of RHEL and UEK4

This patch layers changes made by Microsoft in a Github repo to support
RHEL kernel versions, it eliminates the IRQ Domain dependencies of the
initial commit into mainline. This has a few modifications for OL7/UEK4.

Orabug: 25507635
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
8 years agoAdd the PCI Host driver into the UEK config files
Jack Vogel [Fri, 17 Mar 2017 00:31:21 +0000 (17:31 -0700)]
Add the PCI Host driver into the UEK config files

The kernel configuration files did not include this option.

Orabug: 25507635
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
8 years agoMerge branch topic/uek-4.1/dtrace of git://ca-git.us.oracle.com/linux-uek into uek...
Chuck Anderson [Thu, 9 Mar 2017 09:52:49 +0000 (01:52 -0800)]
Merge branch topic/uek-4.1/dtrace of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/dtrace:
  dtrace: get rid of dtrace_gethrtime
  dtrace: drop spurious debugging left in by accident
  dtrace: comtinuing the FBT implementation and fixes
  dtrace: ensure DTrace can use get_user_pages safely
  dtrace: enable paranoid mode and IST shift for xen_int3
  dtrace: ensure we skip the entire SDT probe point
  dtrace: add ip SDT provider

8 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Chuck Anderson [Thu, 9 Mar 2017 09:50:02 +0000 (01:50 -0800)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/drivers: (262 commits)
  scsi: qla2xxx: Fix apparent cut-n-paste error.
  scsi: qla2xxx: Fix Target mode handling with Multiqueue changes.
  scsi: qla2xxx: Add Block Multi Queue functionality.
  scsi: qla2xxx: Add multiple queue pair functionality.
  qla2xxx: Add irq affinity notification
  scsi: qla2xxx: Fix scsi scan hang triggered if adapter fails during init
  be2net: get rid of custom busy poll code
  be2net: fix initial MAC setting
  be2net: fix MAC addr setting on privileged BE3 VFs
  be2net: don't delete MAC on close on unprivileged BE3 VFs
  be2net: fix status check in be_cmd_pmac_add()
  be2net: Increase skb headroom size to 256 bytes
  be2net: Add DEVSEC privilege to SET_HSW_CONFIG command.
  be2net: do not call napi_hash_del()
  be2net: Enable VF link state setting for BE3
  be2net: Fix TX stats for TSO packets
  be2net: Update Copyright string in be_hw.h
  be2net: NCSI FW section should be properly updated with ethtool for BE3
  be2net: Provide an alternate way to read pf_num for BEx chips
  be2net: mark symbols static where possible
  ...

Conflicts:
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/scsi/be2iscsi/be_main.c

8 years agoMerge branch topic/uek-4.1/rpm-build of git://ca-git.us.oracle.com/linux-uek into...
Chuck Anderson [Thu, 9 Mar 2017 09:30:53 +0000 (01:30 -0800)]
Merge branch topic/uek-4.1/rpm-build of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/rpm-build:
  uek-rpm: sync up spec with linux-firmware version

8 years agoMerge branch topic/uek-4.1/upstream-cherry-picks of git://ca-git.us.oracle.com/linux...
Chuck Anderson [Thu, 9 Mar 2017 09:28:54 +0000 (01:28 -0800)]
Merge branch topic/uek-4.1/upstream-cherry-picks of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/upstream-cherry-picks:
  perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
  ext2: convert to mbcache2
  ext4: convert to mbcache2
  mbcache2: reimplement mbcache

8 years agoMerge branch topic/uek-4.1/rpm-build of git://ca-git.us.oracle.com/linux-uek into... v4.1.12-93
Chuck Anderson [Thu, 9 Mar 2017 07:39:22 +0000 (23:39 -0800)]
Merge branch topic/uek-4.1/rpm-build of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/rpm-build:
  uek-config: enable CONFIG_MOUSE_PS2_VMMOUSE
  uek-rpm: enable CONFIG_KSPLICE.

8 years agoMerge branch topic/uek-4.1/uek-carry of git://ca-git.us.oracle.com/linux-uek into...
Chuck Anderson [Thu, 9 Mar 2017 07:38:22 +0000 (23:38 -0800)]
Merge branch topic/uek-4.1/uek-carry of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/uek-carry:
  timers: Use proper base migration in add_timer_on()

8 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Chuck Anderson [Thu, 9 Mar 2017 07:36:20 +0000 (23:36 -0800)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/drivers: (289 commits)
  Input: vmmouse - remove port reservation
  Input: vmmouse - fix absolute device registration
  bnxt_en: use eth_hw_addr_random()
  bnxt_en: fix pci cleanup in bnxt_init_one() failure path
  bnxt_en: Fix NULL pointer dereference in a failure path during open.
  bnxt_en: Reject driver probe against all bridge devices
  bnxt_en: Added PCI IDs for BCM57452 and BCM57454 ASICs
  bnxt_en: Fix bnxt_setup_tc() error message.
  bnxt_en: Print FEC settings as part of the linkup dmesg.
  bnxt_en: Do not setup PHY unless driving a single PF.
  bnxt_en: Add hardware NTUPLE filter for encapsulated packets.
  bnxt_en: Allow NETIF_F_NTUPLE to be enabled on VFs.
  bnxt_en: Fix ethtool -l pre-set max combined channel.
  bnxt_en: Retry failed NVM_INSTALL_UPDATE with defragmentation flag.
  bnxt_en: Update to firmware interface spec 1.7.0.
  bnxt_en: Refactor tx completion path.
  bnxt_en: Add a set of TX rings to support XDP.
  bnxt_en: Add tx ring mapping logic.
  bnxt_en: Centralize logic to reserve rings.
  bnxt_en: Use event bit map in RX path.
  ...

8 years agoMerge branch topic/uek-4.1/upstream-cherry-picks of git://ca-git.us.oracle.com/linux...
Chuck Anderson [Thu, 9 Mar 2017 07:34:05 +0000 (23:34 -0800)]
Merge branch topic/uek-4.1/upstream-cherry-picks of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/upstream-cherry-picks:
  Btrfs: fix crash on fsync when using overlayfs v4
  vfio/pci: Hide broken INTx support from user
  crypto: cryptd - Assign statesize properly
  crypto: ghash-clmulni - Fix load failure
  USB: digi_acceleport: do sanity checking for the number of ports
  ksplice: add sysctls for determining Ksplice features.
  signal: protect SIGNAL_UNKILLABLE from unintentional clearing.

Conflicts:
kernel/Makefile
kernel/sysctl.c

8 years agoMerge branch topic/uek-4.1/rpm-build of git://ca-git.us.oracle.com/linux-uek into... v4.1.12-92
Chuck Anderson [Thu, 9 Mar 2017 04:34:31 +0000 (20:34 -0800)]
Merge branch topic/uek-4.1/rpm-build of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/rpm-build:
  config: enable simple framebuffer driver for OL6
  fm10k: Add driver to the kernel config for UEK4

8 years agoMerge branch topic/uek-4.1/sparc of git://ca-git.us.oracle.com/linux-uek into uek...
Chuck Anderson [Thu, 9 Mar 2017 04:24:57 +0000 (20:24 -0800)]
Merge branch topic/uek-4.1/sparc of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/sparc: (32 commits)
  sparc: fix kernel panic caused by vio handshake
  sparc64: Add sensible read values for /proc/<pid>/sparc_adi
  sparc64: Add ability to set the mcde state for a process
  sparc64: Add proc files specific to ADI
  sparc64: add mcd_on_by_default
  Revert "sparc: fix intermittent LDom hang waiting for vdc_port_up"
  sparc64: Add support for ADI (Application Data Integrity)
  sparc64: Add support for ADI register fields, ASIs and traps
  mm: Add functions to support extra actions on swap in/out
  signals, sparc: Add signal codes for ADI violations
  sparc64: shut down to OBP correctly
  sparc64: fix for user probes in high memory
  sparc64: Use online cpus instead of present cpus during hotplug.
  sparc64: Update cpumaps correctly during hotplug.
  sparc: fix intermittent LDom hang waiting for vdc_port_up
  arch/sparc: Add a dedicated clear_page and clear_user_page for M7
  sparc64: perf: Enable dynamic tracepoints when using perf probe
  SPARC64: UEK4 LDOMS DOMAIN SERVICES UPDATE 7
  arch/sparc: Fix indexing msi_msiqid_table and msi_irq_table
  arch/sparc: Clear msi_msiqid_table during teardown
  ...

8 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Chuck Anderson [Thu, 9 Mar 2017 04:16:08 +0000 (20:16 -0800)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/drivers: (200 commits)
  scsi: megaraid-sas: request irqs later
  scsi: megaraid_sas: add in missing white spaces in error messages text
  scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
  scsi: megaraid_sas: driver version upgrade
  scsi: megaraid_sas: Do not set MPI2_TYPE_CUDA for JBOD FP path for FW which does not support JBOD sequence map
  scsi: megaraid_sas: Send SYNCHRONIZE_CACHE for VD to firmware
  scsi: megaraid_sas: Do not fire DCMDs during PCI shutdown/detach
  scsi: megaraid_sas: Send correct PhysArm to FW for R1 VD downgrade
  scsi: megaraid_sas: For SRIOV enabled firmware, ensure VF driver waits for 30secs before reset
  scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
  scsi: megaraid_sas: clean function declarations in megaraid_sas_base.c up
  scsi: megaraid_sas: add in missing white space in error message text
  scsi: megaraid_sas: Fix the search of first memory bar
  scsi: megaraid_sas: Use memdup_user() rather than duplicating its implementation
  megaraid_sas: Fix probing cards without io port
  megaraid_sas: Do not fire MR_DCMD_PD_LIST_QUERY to controllers which do not support it
  megaraid_sas: Downgrade two success messages to info
  megaraid_sas: driver version upgrade
  megaraid_sas: task management code optimizations
  megaraid_sas: call ISR function to clean up pending replies in OCR path
  ...

8 years agoMerge branch topic/uek-4.1/upstream-cherry-picks of git://ca-git.us.oracle.com/linux...
Chuck Anderson [Thu, 9 Mar 2017 04:00:03 +0000 (20:00 -0800)]
Merge branch topic/uek-4.1/upstream-cherry-picks of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/upstream-cherry-picks: (280 commits)
  dm btree: fix bufio buffer leaks in dm_btree_del() error path
  ipv4: keep skb->dst around in presence of IP options
  ip6_gre: fix ip6gre_err() invalid reads
  watchdog: hpwdt: changed maintainer information
  watchdog: hpwdt: add support for iLO5
  watchdog: hpwdt: remove email address from doc
  watchdog: hpwdt: Adjust documentation to match latest kernel module parameters.
  hpwdt: use nmi_panic() when kernel panics in NMI handler
  panic: change nmi_panic from macro to function
  watchdog/hpwdt: Fix build on certain configs
  watchdog/hpwdt: Create stack frame in asminline_call()
  x86/asm: Add C versions of frame pointer macros
  x86/asm: Clean up frame pointer macros
  watchdog: hpwdt: HP rebranding
  panic, x86: Allow CPUs to save registers even if looping in NMI context
  watchdog: hpwdt: Add support for WDIOC_SETOPTIONS
  kvm: fix page struct leak in handle_vmon
  bnx2: use READ_ONCE() instead of barrier()
  bnx2: Wait for in-flight DMA to complete at probe stage
  bnx2: fix locking when netconsole is used
  ...

8 years agoMerge branch topic/uek-4.1/stable-cherry-picks of git://ca-git.us.oracle.com/linux...
Chuck Anderson [Thu, 9 Mar 2017 03:44:09 +0000 (19:44 -0800)]
Merge branch topic/uek-4.1/stable-cherry-picks of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* topic/uek-4.1/stable-cherry-picks:
  btrfs: trimming some start_transaction() code away
  dm flakey: fix reads to be issued if drop_writes configured

8 years agosparc: fix kernel panic caused by vio handshake
Thomas Tai [Mon, 13 Feb 2017 14:50:05 +0000 (06:50 -0800)]
sparc: fix kernel panic caused by vio handshake

During hours long reboot test, the primary prints out multiple TX trigger
errors followed by a VIO handshake panic. The TX trigger error happens
because the primary ldmvsw detects that the ldc channel is down. In this
situation, the ldc operation is aborted, the tx and rx queue are then
flushed. The problem is that the rx queue may contain a LDC_EVENT_RESET
sent by the guest. It causes the primary to think that the ldc channel
is not in reset state. When the guest comes up again, the handshake is
out of sequence and thus causes handshake panic.

The TX trigger error would not have happened if the LDC_EVENT_RESET was
received before the TX checked the ldc link state. This is the reason
why the panic happens intermittently.

This patch checks for the connection reset and changes the ldc state to
reset. The reset logic is taken from existing vnet_event_napi() ldc_ctrl:
code path.

Orabug: 23476613
Orabug: 25064864

Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
8 years agosparc64: Add sensible read values for /proc/<pid>/sparc_adi
Khalid Aziz [Fri, 2 Dec 2016 19:45:37 +0000 (12:45 -0700)]
sparc64: Add sensible read values for /proc/<pid>/sparc_adi

This patch makes value read from /proc/<pid>/sparc_adi consistent
across platforms that support ADi and ones that do not. When ADI is
not available for a process either due to process being an anonymous
process on an ADI-capable platform or the process is running on a
non-ADI platform, a read from /proc/<pid>/sparc_adi always reads a
value of -1. This patch updates the documentation file as well with
the values for sparc_adi proc file.

Orabug: 25173120

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Add ability to set the mcde state for a process
Eric Snowberg [Thu, 17 Nov 2016 21:27:36 +0000 (13:27 -0800)]
sparc64: Add ability to set the mcde state for a process

turn off version checking (PSTATE.mcde) to avoid tripping over ADI
versions in flux.  This has been partially remedied by using non-faulting
loads.

However, there is still a need to turn off PSTATE.mcde in memory dump
functions.  This is to determine if an address is readable.  If the
address is unreadable, the dump shows the memory contents as "********"
instead of a 4-byte hex value.

Orabug: 25130002

Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: Add proc files specific to ADI
Khalid Aziz [Wed, 16 Nov 2016 23:43:13 +0000 (16:43 -0700)]
sparc64: Add proc files specific to ADI

This patch adds /proc/sys/kernel/mcd_on_by_default and
/proc/<pid>/sparc_adi files. These files allow userspace access to
change ADI parameters.

Orabug: 22713162

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
8 years agosparc64: add mcd_on_by_default
Chuck Anderson [Sat, 18 Feb 2017 06:15:35 +0000 (22:15 -0800)]
sparc64: add mcd_on_by_default

Add the global variable mcd_on_by_default and support for the kernel boot arg
"mcd_on_by_default" which causes mcd_on_by_default = 1 if the kernel is
adi_capable().

Based on the code in commit:
    sparc64: Enable Application Data Integrity for m7 and newer processors
Required by commit:
    sparc64: Add proc files specific to ADI

Orabug: 22713162
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
8 years agoRevert "sparc: fix intermittent LDom hang waiting for vdc_port_up"
Chuck Anderson [Sat, 18 Feb 2017 04:59:43 +0000 (20:59 -0800)]
Revert "sparc: fix intermittent LDom hang waiting for vdc_port_up"

This reverts commit 94ac2958dd26064af74f49a966e3b7e3bd4dccfe.

Orabug: 25409637

8 years agosparc64: Add support for ADI (Application Data Integrity)
Khalid Aziz [Wed, 15 Feb 2017 19:57:59 +0000 (12:57 -0700)]
sparc64: Add support for ADI (Application Data Integrity)

ADI is a new feature supported on SPARC M7 and newer processors to allow
hardware to catch rogue accesses to memory. ADI is supported for data
fetches only and not instruction fetches. An app can enable ADI on its
data pages, set version tags on them and use versioned addresses to
access the data pages. Upper bits of the address contain the version
tag. On M7 processors, upper four bits (bits 63-60) contain the version
tag. If a rogue app attempts to access ADI enabled data pages, its
access is blocked and processor generates an exception. Please see
Documentation/sparc/adi.txt for further details.

This patch extends mprotect to enable ADI (TSTATE.mcde), enable/disable
MCD (Memory Corruption Detection) on selected memory ranges, enable
TTE.mcd in PTEs, return ADI parameters to userspace and save/restore ADI
version tags on page swap out/in or migration. It also adds handlers for
traps related to MCD. ADI is not enabled by default for any task. A task
must explicitly enable ADI on a memory range and set version tag for ADI
to be effective for the task.

This initial implementation supports saving and restoring one tag per
page. A page must use same version tag across the entire page for the
tag to survive swap and migration. Swap swupport infrastructure in this
patch allows for this capability to be expanded to store/restore more
than one tag per page in future.

This is a backport of patch sent upstream and brings UEK code closer to
upstream patch v6.

Orabug: 22713162

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Khalid Aziz <khalid@gonehiking.org>