Commit Graph

810591 Commits

Author SHA1 Message Date
David Howells
935c6912b1 ipc: Convert mqueue fs to fs_context
Convert the mqueue filesystem to use the filesystem context stuff.

Notes:

 (1) The relevant ipc namespace is selected in when the context is
     initialised (and it defaults to the current task's ipc namespace).
     The caller can override this before calling vfs_get_tree().

 (2) Rather than simply calling kern_mount_data(), mq_init_ns() and
     mq_internal_mount() create a context, adjust it and then do the rest
     of the mount procedure.

 (3) The lazy mqueue mounting on creation of a new namespace is retained
     from a previous patch, but the avoidance of sget() if no superblock
     yet exists is reverted and the superblock is again keyed on the
     namespace pointer.

     Yes, there was a performance gain in not searching the superblock
     hash, but it's only paid once per ipc namespace - and only if someone
     uses mqueue within that namespace, so I'm not sure it's worth it,
     especially as calling sget() allows avoidance of recursion.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:29 -05:00
David Howells
66f592e2ec proc: Add fs_context support to procfs
Add fs_context support to procfs.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:28 -05:00
David Howells
60a3c3a58e procfs: Move proc_fill_super() to fs/proc/root.c
Move proc_fill_super() to fs/proc/root.c as that's where the other
superblock stuff is.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Alexey Dobriyan <adobriyan@gmail.com>
cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:27 -05:00
Al Viro
0b52075ee6 introduce cloning of fs_context
new primitive: vfs_dup_fs_context().  Comes with fs_context
method (->dup()) for copying the filesystem-specific parts
of fs_context, along with LSM one (->fs_context_dup()) for
doing the same to LSM parts.

[needs better commit message, and change of Author:, anyway]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:27 -05:00
Al Viro
cb50b348c7 convenience helpers: vfs_get_super() and sget_fc()
the former is an analogue of mount_{single,nodev} for use in
->get_tree() instances, the latter - analogue of sget() for the
same.

These are fairly similar to the originals, but the callback signature
for sget_fc() is different from sget() ones, so getting bits and
pieces shared would be too convoluted; we might get around to that
later, but for now let's just remember to keep them in sync.  They
do live next to each other, and changes in either won't be hard
to spot.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:26 -05:00
David Howells
3e1aeb00e6 vfs: Implement a filesystem superblock creation/configuration context
[AV - unfuck kern_mount_data(); we want non-NULL ->mnt_ns on long-living
mounts]
[AV - reordering fs/namespace.c is badly overdue, but let's keep it
separate from that series]
[AV - drop simple_pin_fs() change]
[AV - clean vfs_kern_mount() failure exits up]

Implement a filesystem context concept to be used during superblock
creation for mount and superblock reconfiguration for remount.

The mounting procedure then becomes:

 (1) Allocate new fs_context context.

 (2) Configure the context.

 (3) Create superblock.

 (4) Query the superblock.

 (5) Create a mount for the superblock.

 (6) Destroy the context.

Rather than calling fs_type->mount(), an fs_context struct is created and
fs_type->init_fs_context() is called to set it up.  Pointers exist for the
filesystem and LSM to hang their private data off.

A set of operations has to be set by ->init_fs_context() to provide
freeing, duplication, option parsing, binary data parsing, validation,
mounting and superblock filling.

Legacy filesystems are supported by the provision of a set of legacy
fs_context operations that build up a list of mount options and then invoke
fs_type->mount() from within the fs_context ->get_tree() operation.  This
allows all filesystems to be accessed using fs_context.

It should be noted that, whilst this patch adds a lot of lines of code,
there is quite a bit of duplication with existing code that can be
eliminated should all filesystems be converted over.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:26 -05:00
David Howells
846e566218 vfs: Put security flags into the fs_context struct
Put security flags, such as SECURITY_LSM_NATIVE_LABELS, into the filesystem
context so that the filesystem can communicate them to the LSM more easily.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:25 -05:00
David Howells
2febd254ad smack: Implement filesystem context security hooks
Implement filesystem context security hooks for the smack LSM.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Casey Schaufler <casey@schaufler-ca.com>
cc: linux-security-module@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:25 -05:00
David Howells
442155c1bd selinux: Implement the new mount API LSM hooks
Implement the new mount API LSM hooks for SELinux.  At some point the old
hooks will need to be removed.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Paul Moore <paul@paul-moore.com>
cc: Stephen Smalley <sds@tycho.nsa.gov>
cc: selinux@tycho.nsa.gov
cc: linux-security-module@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:24 -05:00
David Howells
da2441fdff vfs: Add LSM hooks for the new mount API
Add LSM hooks for use by the new mount API and filesystem context code.
This includes:

 (1) Hooks to handle allocation, duplication and freeing of the security
     record attached to a filesystem context.

 (2) A hook to snoop source specifications.  There may be multiple of these
     if the filesystem supports it.  They will to be local files/devices if
     fs_context::source_is_dev is true and will be something else, possibly
     remote server specifications, if false.

 (3) A hook to snoop superblock configuration options in key[=val] form.
     If the LSM decides it wants to handle it, it can suppress the option
     being passed to the filesystem.  Note that 'val' may include commas
     and binary data with the fsopen patch.

 (4) A hook to perform validation and allocation after the configuration
     has been done but before the superblock is allocated and set up.

 (5) A hook to transfer the security from the context to a newly created
     superblock.

 (6) A hook to rule on whether a path point can be used as a mountpoint.

These are intended to replace:

	security_sb_copy_data
	security_sb_kern_mount
	security_sb_mount
	security_sb_set_mnt_opts
	security_sb_clone_mnt_opts
	security_sb_parse_opts_str

[AV -- some of the methods being replaced are already gone, some of the
methods are not added for the lack of need]

Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-security-module@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:29:23 -05:00
David Howells
31d921c7fb vfs: Add configuration parser helpers
Because the new API passes in key,value parameters, match_token() cannot be
used with it.  Instead, provide three new helpers to aid with parsing:

 (1) fs_parse().  This takes a parameter and a simple static description of
     all the parameters and maps the key name to an ID.  It returns 1 on a
     match, 0 on no match if unknowns should be ignored and some other
     negative error code on a parse error.

     The parameter description includes a list of key names to IDs, desired
     parameter types and a list of enumeration name -> ID mappings.

     [!] Note that for the moment I've required that the key->ID mapping
     array is expected to be sorted and unterminated.  The size of the
     array is noted in the fsconfig_parser struct.  This allows me to use
     bsearch(), but I'm not sure any performance gain is worth the hassle
     of requiring people to keep the array sorted.

     The parameter type array is sized according to the number of parameter
     IDs and is indexed directly.  The optional enum mapping array is an
     unterminated, unsorted list and the size goes into the fsconfig_parser
     struct.

     The function can do some additional things:

	(a) If it's not ambiguous and no value is given, the prefix "no" on
	    a key name is permitted to indicate that the parameter should
	    be considered negatory.

	(b) If the desired type is a single simple integer, it will perform
	    an appropriate conversion and store the result in a union in
	    the parse result.

	(c) If the desired type is an enumeration, {key ID, name} will be
	    looked up in the enumeration list and the matching value will
	    be stored in the parse result union.

	(d) Optionally generate an error if the key is unrecognised.

     This is called something like:

	enum rdt_param {
		Opt_cdp,
		Opt_cdpl2,
		Opt_mba_mpbs,
		nr__rdt_params
	};

	const struct fs_parameter_spec rdt_param_specs[nr__rdt_params] = {
		[Opt_cdp]	= { fs_param_is_bool },
		[Opt_cdpl2]	= { fs_param_is_bool },
		[Opt_mba_mpbs]	= { fs_param_is_bool },
	};

	const const char *const rdt_param_keys[nr__rdt_params] = {
		[Opt_cdp]	= "cdp",
		[Opt_cdpl2]	= "cdpl2",
		[Opt_mba_mpbs]	= "mba_mbps",
	};

	const struct fs_parameter_description rdt_parser = {
		.name		= "rdt",
		.nr_params	= nr__rdt_params,
		.keys		= rdt_param_keys,
		.specs		= rdt_param_specs,
		.no_source	= true,
	};

	int rdt_parse_param(struct fs_context *fc,
			    struct fs_parameter *param)
	{
		struct fs_parse_result parse;
		struct rdt_fs_context *ctx = rdt_fc2context(fc);
		int ret;

		ret = fs_parse(fc, &rdt_parser, param, &parse);
		if (ret < 0)
			return ret;

		switch (parse.key) {
		case Opt_cdp:
			ctx->enable_cdpl3 = true;
			return 0;
		case Opt_cdpl2:
			ctx->enable_cdpl2 = true;
			return 0;
		case Opt_mba_mpbs:
			ctx->enable_mba_mbps = true;
			return 0;
		}

		return -EINVAL;
	}

 (2) fs_lookup_param().  This takes a { dirfd, path, LOOKUP_EMPTY? } or
     string value and performs an appropriate path lookup to convert it
     into a path object, which it will then return.

     If the desired type was a blockdev, the type of the looked up inode
     will be checked to make sure it is one.

     This can be used like:

	enum foo_param {
		Opt_source,
		nr__foo_params
	};

	const struct fs_parameter_spec foo_param_specs[nr__foo_params] = {
		[Opt_source]	= { fs_param_is_blockdev },
	};

	const char *char foo_param_keys[nr__foo_params] = {
		[Opt_source]	= "source",
	};

	const struct constant_table foo_param_alt_keys[] = {
		{ "device",	Opt_source },
	};

	const struct fs_parameter_description foo_parser = {
		.name		= "foo",
		.nr_params	= nr__foo_params,
		.nr_alt_keys	= ARRAY_SIZE(foo_param_alt_keys),
		.keys		= foo_param_keys,
		.alt_keys	= foo_param_alt_keys,
		.specs		= foo_param_specs,
	};

	int foo_parse_param(struct fs_context *fc,
			    struct fs_parameter *param)
	{
		struct fs_parse_result parse;
		struct foo_fs_context *ctx = foo_fc2context(fc);
		int ret;

		ret = fs_parse(fc, &foo_parser, param, &parse);
		if (ret < 0)
			return ret;

		switch (parse.key) {
		case Opt_source:
			return fs_lookup_param(fc, &foo_parser, param,
					       &parse, &ctx->source);
		default:
			return -EINVAL;
		}
	}

 (3) lookup_constant().  This takes a table of named constants and looks up
     the given name within it.  The table is expected to be sorted such
     that bsearch() be used upon it.

     Possibly I should require the table be terminated and just use a
     for-loop to scan it instead of using bsearch() to reduce hassle.

     Tables look something like:

	static const struct constant_table bool_names[] = {
		{ "0",		false },
		{ "1",		true },
		{ "false",	false },
		{ "no",		false },
		{ "true",	true },
		{ "yes",	true },
	};

     and a lookup is done with something like:

	b = lookup_constant(bool_names, param->string, -1);

Additionally, optional validation routines for the parameter description
are provided that can be enabled at compile time.  A later patch will
invoke these when a filesystem is registered.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-02-28 03:28:53 -05:00
David Howells
c6b82263f9 vfs: Introduce logging functions
Introduce a set of logging functions through which informational messages,
warnings and error messages incurred by the mount procedure can be logged
and, in a future patch, passed to userspace instead by way of the
filesystem configuration context file descriptor.

There are four functions:

 (1) infof(const char *fmt, ...);

     Logs an informational message.

 (2) warnf(const char *fmt, ...);

     Logs a warning message.

 (3) errorf(const char *fmt, ...);

     Logs an error message.

 (4) invalf(const char *fmt, ...);

     As errof(), but returns -EINVAL so can be used on a return statement.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:28 -05:00
Al Viro
f3a09c9201 introduce fs_context methods
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:27 -05:00
Al Viro
e1a91586d5 fs_context flavour for submounts
This is an eventual replacement for vfs_submount() uses.  Unlike the
"mount" and "remount" cases, the users of that thing are not in VFS -
they are buried in various ->d_automount() instances and rather than
converting them all at once we introduce the (thankfully small and
simple) infrastructure here and deal with the prospective users in
afs, nfs, etc. parts of the series.

Here we just introduce a new constructor (fs_context_for_submount())
along with the corresponding enum constant to be put into fc->purpose
for those.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:27 -05:00
David Howells
8d0347f6c3 convert do_remount_sb() to fs_context
Replace do_remount_sb() with a function, reconfigure_super(), that's
fs_context aware.  The fs_context is expected to be parameterised already
and have ->root pointing to the superblock to be reconfigured.

A legacy wrapper is provided that is intended to be called from the
fs_context ops when those appear, but for now is called directly from
reconfigure_super().  This wrapper invokes the ->remount_fs() superblock op
for the moment.  It is intended that the remount_fs() op will be phased
out.

The fs_context->purpose is set to FS_CONTEXT_FOR_RECONFIGURE to indicate
that the context is being used for reconfiguration.

do_umount_root() is provided to consolidate remount-to-R/O for umount and
emergency remount by creating a context and invoking reconfiguration.

do_remount(), do_umount() and do_emergency_remount_callback() are switched
to use the new process.

[AV -- fold UMOUNT and EMERGENCY_REMOUNT in; fixes the
umount / bug, gets rid of pointless complexity]
[AV -- set ->net_ns in all cases; nfs remount will need that]
[AV -- shift security_sb_remount() call into reconfigure_super(); the callers
that didn't do security_sb_remount() have NULL fc->security anyway, so it's
a no-op for them]

Signed-off-by: David Howells <dhowells@redhat.com>
Co-developed-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:26 -05:00
Al Viro
c9ce29ed79 vfs_get_tree(): evict the call of security_sb_kern_mount()
Right now vfs_get_tree() calls security_sb_kern_mount() (i.e.
mount MAC) unless it gets MS_KERNMOUNT or MS_SUBMOUNT in flags.
Doing it that way is both clumsy and imprecise.

Consider the callers' tree of vfs_get_tree():
vfs_get_tree()
        <- do_new_mount()
	<- vfs_kern_mount()
		<- simple_pin_fs()
		<- vfs_submount()
		<- kern_mount_data()
		<- init_mount_tree()
		<- btrfs_mount()
			<- vfs_get_tree()
		<- nfs_do_root_mount()
			<- nfs4_try_mount()
				<- nfs_fs_mount()
					<- vfs_get_tree()
			<- nfs4_referral_mount()

do_new_mount() always does need MAC (we are guaranteed that neither
MS_KERNMOUNT nor MS_SUBMOUNT will be passed there).

simple_pin_fs(), vfs_submount() and kern_mount_data() pass explicit
flags inhibiting that check.  So does nfs4_referral_mount() (the
flags there are ulimately coming from vfs_submount()).

init_mount_tree() is called too early for anything LSM-related; it
doesn't matter whether we attempt those checks, they'll do nothing.

Finally, in case of btrfs_mount() and nfs_fs_mount(), doing MAC
is pointless - either the caller will do it, or the flags are
such that we wouldn't have done it either.

In other words, the one and only case when we want that check
done is when we are called from do_new_mount(), and there we
want it unconditionally.

So let's simply move it there.  The superblock is still locked,
so nobody is going to get access to it (via ustat(2), etc.)
until we get a chance to apply the checks - we are free to
move them to any point up to where we drop ->s_umount (in
do_new_mount_fc()).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:26 -05:00
David Howells
132e460848 new helper: do_new_mount_fc()
Create an fs_context-aware version of do_new_mount().  This takes an
fs_context with a superblock already attached to it.

Make do_new_mount() use do_new_mount_fc() rather than do_new_mount(); this
allows the consolidation of the mount creation, check and add steps.

To make this work, mount_too_revealing() is changed to take a superblock
rather than a mount (which the fs_context doesn't have available), allowing
this check to be done before the mount object is created.

Signed-off-by: David Howells <dhowells@redhat.com>
Co-developed-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:25 -05:00
Al Viro
a0c9a8b8fd teach vfs_get_tree() to handle subtype, switch do_new_mount() to it
Roll the handling of subtypes into do_new_mount() and vfs_get_tree().  The
former determines any subtype string and hangs it off the fs_context; the
latter applies it.

Make do_new_mount() create, parameterise and commit an fs_context and
create a mount for itself rather than calling vfs_kern_mount().

[AV -- missing kstrdup()]
[AV -- ... and no kstrdup() if we get to setting ->s_submount - we
simply transfer it from fc, leaving NULL behind]
[AV -- constify ->s_submount, while we are at it]

Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:25 -05:00
Al Viro
8f2918898e new helpers: vfs_create_mount(), fc_mount()
Create a new helper, vfs_create_mount(), that creates a detached vfsmount
object from an fs_context that has a superblock attached to it.

Almost all uses will be paired with immediately preceding vfs_get_tree();
add a helper for such combination.

Switch vfs_kern_mount() to use this.

NOTE: mild behaviour change; passing NULL as 'device name' to
something like procfs will change /proc/*/mountstats - "device none"
instead on "no device".  That is consistent with /proc/mounts et.al.

[do'h - EXPORT_SYMBOL_GPL slipped in by mistake; removed]
[AV -- remove confused comment from vfs_create_mount()]
[AV -- removed the second argument]

Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:24 -05:00
David Howells
9bc61ab18b vfs: Introduce fs_context, switch vfs_kern_mount() to it.
Introduce a filesystem context concept to be used during superblock
creation for mount and superblock reconfiguration for remount.  This is
allocated at the beginning of the mount procedure and into it is placed:

 (1) Filesystem type.

 (2) Namespaces.

 (3) Source/Device names (there may be multiple).

 (4) Superblock flags (SB_*).

 (5) Security details.

 (6) Filesystem-specific data, as set by the mount options.

Accessor functions are then provided to set up a context, parameterise it
from monolithic mount data (the data page passed to mount(2)) and tear it
down again.

A legacy wrapper is provided that implements what will be the basic
operations, wrapping access to filesystems that aren't yet aware of the
fs_context.

Finally, vfs_kern_mount() is changed to make use of the fs_context and
mount_fs() is replaced by vfs_get_tree(), called from vfs_kern_mount().
[AV -- add missing kstrdup()]
[AV -- put_cred() can be unconditional - fc->cred can't be NULL]
[AV -- take legacy_validate() contents into legacy_parse_monolithic()]
[AV -- merge KERNEL_MOUNT and USER_MOUNT]
[AV -- don't unlock superblock on success return from vfs_get_tree()]
[AV -- kill 'reference' argument of init_fs_context()]

Signed-off-by: David Howells <dhowells@redhat.com>
Co-developed-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:23 -05:00
Al Viro
74e831221c saner handling of temporary namespaces
mount_subtree() creates (and soon destroys) a temporary namespace,
so that automounts could function normally.  These beasts should
never become anyone's current namespaces; they don't, but it would
be better to make prevention of that more straightforward.  And
since they don't become anyone's current namespace, we don't need
to bother with reserving procfs inums for those.

Teach alloc_mnt_ns() to skip inum allocation if told so, adjust
put_mnt_ns() accordingly, make mount_subtree() use temporary
(anon) namespace.  is_anon_ns() checks if a namespace is such.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:44:07 -05:00
Al Viro
3bd045cc9c separate copying and locking mount tree on cross-userns copies
Rather than having propagate_mnt() check doing unprivileged copies,
lock them before commit_tree().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-30 17:14:50 -05:00
Al Viro
6d7fbce7da kill kernfs_pin_sb()
unused now and impossible to use safely anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-17 12:02:57 -05:00
Al Viro
35ac118424 cgroup: saner refcounting for cgroup_root
* make the reference from superblock to cgroup_root counting -
do cgroup_put() in cgroup_kill_sb() whether we'd done
percpu_ref_kill() or not; matching grab is done when we allocate
a new root.  That gives the same refcounting rules for all callers
of cgroup_do_mount() - a reference to cgroup_root has been grabbed
by caller and it either is transferred to new superblock or dropped.

* have cgroup_kill_sb() treat an already killed refcount as "just
don't bother killing it, then".

* after successful cgroup_do_mount() have cgroup1_mount() recheck
if we'd raced with mount/umount from somebody else and cgroup_root
got killed.  In that case we drop the superblock and bugger off
with -ERESTARTSYS, same as if we'd found it in the list already
dying.

* don't bother with delayed initialization of refcount - it's
unreliable and not needed.  No need to prevent attempts to bump
the refcount if we find cgroup_root of another mount in progress -
sget will reuse an existing superblock just fine and if the
other sb manages to die before we get there, we'll catch
that immediately after cgroup_do_mount().

* don't bother with kernfs_pin_sb() - no need for doing that
either.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-17 11:53:02 -05:00
Al Viro
399504e21a fix cgroup_do_mount() handling of failure exits
same story as with last May fixes in sysfs (7b745a4e40
"unfuck sysfs_mount()"); new_sb is left uninitialized
in case of early errors in kernfs_mount_ns() and papering
over it by treating any error from kernfs_mount_ns() as
equivalent to !new_ns ends up conflating the cases when
objects had never been transferred to a superblock with
ones when that has happened and resulting new superblock
had been dropped.  Easily fixed (same way as in sysfs
case).  Additionally, there's a superblock leak on
kernfs_node_dentry() failure *and* a dentry leak inside
kernfs_node_dentry() itself - the latter on probably
impossible errors, but the former not impossible to trigger
(as the matter of fact, injecting allocation failures
at that point *does* trigger it).

Cc: stable@kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2019-01-17 11:52:49 -05:00
Linus Torvalds
1c7fc5cbc3 Linux 5.0-rc2 2019-01-14 10:41:12 +12:00
Jonathan Neuschäfer
b7285b4253 kernel/sys.c: Clarify that UNAME26 does not generate unique versions anymore
UNAME26 is a mechanism to report Linux's version as 2.6.x, for
compatibility with old/broken software.  Due to the way it is
implemented, it would have to be updated after 5.0, to keep the
resulting versions unique.  Linus Torvalds argued:

 "Do we actually need this?

  I'd rather let it bitrot, and just let it return random versions. It
  will just start again at 2.4.60, won't it?

  Anybody who uses UNAME26 for a 5.x kernel might as well think it's
  still 4.x. The user space is so old that it can't possibly care about
  differences between 4.x and 5.x, can it?

  The only thing that matters is that it shows "2.4.<largeenough>",
  which it will do regardless"

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-01-14 10:38:03 +12:00
Linus Torvalds
dbc3c09b81 ARM: SoC fixes
A bigger batch than I anticipated this week, for two reasons:
 
  - Some fallout on Davinci from board file -> DTB conversion, that also
  includes a few longer-standing fixes (i.e. not recent regressions).
 
  - drivers/reset material that has been in linux-next for a while, but
  didn't get sent to us until now for a variety of reasons (maintainer out
  sick, holidays, etc). There's a functional dependency in there such that
  one platform (Altera's SoCFPGA) won't boot without one of the patches;
  instead of reverting the patch that got merged, I looked at this set
  and decided it was small enough that I'll pick it up anyway. If you
  disagree I can revisit with a smaller set.
 
 That being said, there's also a handful of the usual stuff:
 
  - Fix for a crash on Armada 7K/8K when the kernel touches PSCI-reserved
  memory
  - Fix for PCIe reset on Macchiatobin (Armada 8K development board, what
  this email is sent from in fact :)
  - Enable a few new-merged modules for Amlogic in arm64 defconfig
  - Error path fixes on Integrator
  - Build fix for Renesas and Qualcomm
  - Initialization fix for Renesas RZ/G2E
 
  + A few more fixlets.
 -----BEGIN PGP SIGNATURE-----
 
 iQJDBAABCAAtFiEElf+HevZ4QCAJmMQ+jBrnPN6EHHcFAlw7hv0PHG9sb2ZAbGl4
 b20ubmV0AAoJEIwa5zzehBx3rrYP/ixwKcLu9mEW9pbTmQw9m/vAGRgah4b+prT2
 KNWfphwPEfFjzEE1zNwnELEJMip3Sq0s9vEbju6VHeaUeLBfGQl7160HtLK7isHX
 nnJOgz0r1jDJbXmbijbcQEYLagnxV6bwh30skCx/HjUGd/IgTAsFJ2zXtaQNob2u
 QAlCp7E21eVleNnoRkU+tGys+8+JooS6QXzi3hhvqnwQAuAMRAa05C36jtYPnNcg
 jpLtBcxgtngHprqxfNCNpsiAsacWL1K62B3atY77+wl0Fv25pH0q67e+YAtaXLDP
 iRd79pmZ803C8guAAUantxjRWoog4wCf1o97EEMpqfeY0Q4bdUAgn3+ZCG+rYTIW
 tQFm8KqYvdo29Aub6ytNnhC+VzYLCrApDkEhBKEq92J2weBvq0cnw3JmGsTeeiWX
 uS6ittI6VAQOXzgZ5uOrnLFlpqgGb9BZt8aCzXzwbffApNVj6CUtuYXTE4PJNLB1
 yeO7IIrCXupTnJklNUrveWjfNhs2bJ6RN2OgifDhxEZBDd8PH9JJKmRfi/mSo7u+
 5O1d2UoeL6NFKDlaqvEy5mzgD2z0dA5VEcnY663khu0UxRpp8Vm1z5D+Ay/23D6W
 BrF1GVafcrX374tgqKF78k+z++WRuqE7ThhHR0SQQpM9I+3CYdl6BlqghwqN2P5a
 bhm5RFIK
 =qjfZ
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A bigger batch than I anticipated this week, for two reasons:

   - Some fallout on Davinci from board file -> DTB conversion, that
     also includes a few longer-standing fixes (i.e. not recent
     regressions).

   - drivers/reset material that has been in linux-next for a while, but
     didn't get sent to us until now for a variety of reasons
     (maintainer out sick, holidays, etc). There's a functional
     dependency in there such that one platform (Altera's SoCFPGA) won't
     boot without one of the patches; instead of reverting the patch
     that got merged, I looked at this set and decided it was small
     enough that I'll pick it up anyway. If you disagree I can revisit
     with a smaller set.

  That being said, there's also a handful of the usual stuff:

   - Fix for a crash on Armada 7K/8K when the kernel touches
     PSCI-reserved memory

   - Fix for PCIe reset on Macchiatobin (Armada 8K development board,
     what this email is sent from in fact :)

   - Enable a few new-merged modules for Amlogic in arm64 defconfig

   - Error path fixes on Integrator

   - Build fix for Renesas and Qualcomm

   - Initialization fix for Renesas RZ/G2E

  .. plus a few more fixlets"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
  ARM: integrator: impd1: use struct_size() in devm_kzalloc()
  qcom-scm: Include <linux/err.h> header
  gpio: pl061: handle failed allocations
  ARM: dts: kirkwood: Fix polarity of GPIO fan lines
  arm64: dts: marvell: mcbin: fix PCIe reset signal
  arm64: dts: marvell: armada-ap806: reserve PSCI area
  ARM: dts: da850-lcdk: Correct the sound card name
  ARM: dts: da850-lcdk: Correct the audio codec regulators
  ARM: dts: da850-evm: Correct the sound card name
  ARM: dts: da850-evm: Correct the audio codec regulators
  ARM: davinci: omapl138-hawk: fix label names in GPIO lookup entries
  ARM: davinci: dm644x-evm: fix label names in GPIO lookup entries
  ARM: davinci: dm355-evm: fix label names in GPIO lookup entries
  ARM: davinci: da850-evm: fix label names in GPIO lookup entries
  ARM: davinci: da830-evm: fix label names in GPIO lookup entries
  arm64: defconfig: enable modules for amlogic s400 sound card
  reset: uniphier-glue: Add AHCI reset control support in glue layer
  dt-bindings: reset: uniphier: Add AHCI core reset description
  reset: uniphier-usb3: Rename to reset-uniphier-glue
  dt-bindings: reset: uniphier: Replace the expression of USB3 with generic peripherals
  ...
2019-01-14 10:34:14 +12:00
Linus Torvalds
6b529fb0a3 for-5.0-rc1-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAlw7Y68ACgkQxWXV+ddt
 WDs+Jw/9Hn71GLb1YNpNUlzJSQHUzbvFtXbtvEVyYeuuLkmjTG4FT2bkGqYhAeC9
 2jvaqPaxI0VJ7vNulAaMVZayFwNEQrF9p+z+vzV/Ty2lu0Ep/7Uuwp9KL8X49req
 5hEtb5p9Dbj9hXqa8XNOfF2GPDRTQ6D4eknYiNM7MY+aTkvMEtpuZg9kfwXrZ2au
 JeFBzZo9SA5nxqrXZg1XlRYttDnOf44h6YJmEFOZOJuAouKcd5I7C8BshCRKDuWo
 iJBjYTBTFqjgUgCrn10UM92T19hKufHiDE3WWQ/7zykqtThpKgBFR1opAUcNBJBf
 HvOOsYnZcGbxIKOjFpucSpButTmjFcnI83f/7dmZYXUsyIzP/xH51uLiz/CLJqWj
 JsRgtgtJ7l5s1M8GkFG6B9Tp89KxHnVKqNC5HyX+4AuFWiIJ+CWWSddGqNSfAIHe
 o2ceQRMumvwbVKgfd0AfPcZ9v4sRM/DfwxWXgEQmCSNJikSuUjP9b3D51ttnXQ8c
 q6lz7L6nRKK4mgBnfJCmpus3IArdvNwJ7CF8C1RejfRwL824RzH+yHjWdg36nVXB
 oaBYKJf8GRRn+3In1W6npr65NxCQERIZV4M89EgST/RK7tW5u0Fotd1KJCmo+ayO
 cSRbp16On9G6gBV+qrBs8X65KIWALZpdTycwyFplCU581DXdtnU=
 =aCB2
 -----END PGP SIGNATURE-----

Merge tag 'for-5.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:

 - two regression fixes in clone/dedupe ioctls, the generic check
   callback needs to lock extents properly and wait for io to avoid
   problems with writeback and relocation

 - fix deadlock when using free space tree due to block group creation

 - a recently added check refuses a valid fileystem with seeding device,
   make that work again with a quickfix, proper solution needs more
   intrusive changes

* tag 'for-5.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: Use real device structure to verify dev extent
  Btrfs: fix deadlock when using free space tree due to block group creation
  Btrfs: fix race between reflink/dedupe and relocation
  Btrfs: fix race between cloning range ending at eof and writeback
2019-01-14 05:55:51 +12:00
Linus Torvalds
72d657dd21 Driver core fixes for 5.0-rc2
Here is one small sysfs change, and a documentation update for 5.0-rc2
 
 The sysfs change moves from using BUG_ON to WARN_ON, as discussed in an
 email thread on lkml while trying to track down another driver bug.
 sysfs should not be crashing and preventing people from seeing where
 they went wrong.  Now it properly recovers and warns the developer.
 
 The documentation update removes the use of BUS_ATTR() as the kernel is
 moving away from this to use the specific BUS_ATTR_RW() and friends
 instead.  There are pending patches in all of the different subsystems
 to remove the last users of this macro, but for now, don't advertise it
 should be used anymore to keep new ones from being introduced.
 
 Both have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXDsRFA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynbgACfTY/rAZpWTgMdPDfoOmF+s/XHQXsAoJKZ+v+f
 Tpkcw76Wo1ESpPLuT1u1
 =W0D+
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here is one small sysfs change, and a documentation update for 5.0-rc2

  The sysfs change moves from using BUG_ON to WARN_ON, as discussed in
  an email thread on lkml while trying to track down another driver bug.
  sysfs should not be crashing and preventing people from seeing where
  they went wrong. Now it properly recovers and warns the developer.

  The documentation update removes the use of BUS_ATTR() as the kernel
  is moving away from this to use the specific BUS_ATTR_RW() and friends
  instead. There are pending patches in all of the different subsystems
  to remove the last users of this macro, but for now, don't advertise
  it should be used anymore to keep new ones from being introduced.

  Both have been in linux-next with no reported issues"

* tag 'driver-core-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  Documentation: driver core: remove use of BUS_ATTR
  sysfs: convert BUG_ON to WARN_ON
2019-01-14 05:51:08 +12:00
Linus Torvalds
f7c1038bc7 Staging driver fixes for 5.0-rc2
Here are some small staging driver fixes for some reported issues.
 
 One reverts a patch that was made to the rtl8723bs driver that turned
 out to not be needed at all as it was a bug in clang.  The others fix up
 some reported issues in the rtl8188eu driver and update the MAINTAINERS
 file to point to Larry for this driver so he can get the bug reports
 easier.
 
 All have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXDsPnQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ympdgCfVGVVapWxNgyjKe0oZNFQpF+bMAsAoNXmPbcd
 8ETJe7SzfNH6mjmnw80F
 =LZmR
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are some small staging driver fixes for some reported issues.

  One reverts a patch that was made to the rtl8723bs driver that turned
  out to not be needed at all as it was a bug in clang. The others fix
  up some reported issues in the rtl8188eu driver and update the
  MAINTAINERS file to point to Larry for this driver so he can get the
  bug reports easier.

  All have been in linux-next with no reported issues"

* tag 'staging-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  Revert "staging: rtl8723bs: Mark ACPI table declaration as used"
  staging: rtl8188eu: Fix module loading from tasklet for WEP encryption
  staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption
  MAINTAINERS: Add entry for staging driver r8188eu
2019-01-14 05:49:35 +12:00
Linus Torvalds
437e878a6c tty/serial fixes for 5.0-rc2
Here are 2 tty and serial fixes for 5.0-rc2 that resolve some reported
 issues.
 
 The first is a simple serial driver fix for a regression that showed up
 in 5.0-rc1.  The second one resolves a number of reported issues with
 the recent tty locking fixes that went into 5.0-rc1.  Lots of people
 have tested the second one and say it resolves their issues.
 
 Both have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXDsOzA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yl8OACgg3KREaqF3vizmxVr3xzKk2xG7x0An28XJcYA
 z95ZRO/BuSATH1kTM36D
 =p+SA
 -----END PGP SIGNATURE-----

Merge tag 'tty-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are 2 tty and serial fixes for 5.0-rc2 that resolve some reported
  issues.

  The first is a simple serial driver fix for a regression that showed
  up in 5.0-rc1. The second one resolves a number of reported issues
  with the recent tty locking fixes that went into 5.0-rc1. Lots of
  people have tested the second one and say it resolves their issues.

  Both have been in linux-next with no reported issues"

* tag 'tty-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: Don't hold ldisc lock in tty_reopen() if ldisc present
  serial: lantiq: Do not swap register read/writes
2019-01-14 05:47:48 +12:00
Linus Torvalds
1dd8a3f6c6 USB fixes for 5.0-rc2
Here are some small USB driver fixes and quirk updates for 5.0-rc2.
 
 The majority here are some quirks for some storage devices to get them
 to work properly.  There's also a fix here to resolve the reported
 issues with some audio devices that say they are UAC3 compliant, but
 really are not.
 
 And a fix up for the MAINTAINERS file to remove a dead url.
 
 All have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXDsQMA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykM2wCgzC1E5NUpoCqPZHaYQ/0LNLm6SaEAoIbebWBo
 rl39FeUBmPJLTmKD0pFX
 =4K55
 -----END PGP SIGNATURE-----

Merge tag 'usb-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some small USB driver fixes and quirk updates for 5.0-rc2.

  The majority here are some quirks for some storage devices to get them
  to work properly. There's also a fix here to resolve the reported
  issues with some audio devices that say they are UAC3 compliant, but
  really are not.

  And a fix up for the MAINTAINERS file to remove a dead url.

  All have been in linux-next with no reported issues"

* tag 'usb-5.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: storage: Remove outdated URL from MAINTAINERS
  USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
  usbcore: Select only first configuration for non-UAC3 compliant devices
  USB: storage: add quirk for SMI SM3350
  USB: storage: don't insert sane sense for SPC3+ when bad sense specified
  usb: cdc-acm: send ZLP for Telit 3G Intel based modems
2019-01-14 05:45:28 +12:00
Linus Torvalds
0f9d140a56 a set of cifs/smb3 fixes, 4 for stable, most from Pavel. His patches fix an important set of crediting (flow control) problems, and also two problems in cifs_writepages, ddressing some large i/o and also compounding issues
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAlw6VMAACgkQiiy9cAdy
 T1GA4AwAiLxAK9gYkv7oCi4xkr+GeDr9/J0R4JZOglXrJQfbEDAgejpTqIVOeiTW
 n2fDEe4JCj3Dk9VnhGIAcV3Lyp5pcXuiqKwBJsxlJIIM81rDa98K8NgpJqjFDt1P
 QEsGHijO7/5rlefnMPUy0YrFdoGr9ZjDEYDx2RdTkuRAX2rqLI02ytqyB6AHMjSM
 zx5Ck1JdltrZa9vN1k2QoUW92FLrHWHDQM6ooRTiTv1n5v3CtVCFNFEUD9AWCdKy
 APFXva3cWPAh6Dvsh6Qtryn2WdSfDdy69iiqfkBrDaaLsJC0oCogK9TsQOL66Szu
 onpXQROqxvOA0UoyJJgRaDhRjGzRLglChpitS9ps4ZqziXRMpKBsn9SzaZiJ3Jna
 /u5Pv5CFr4JkXRnvLAx2h6coZ+FyfVmSgxtoCU+tdn8G0t2AXl7swUw2e2UX7k4y
 FR20/w0hA9pDVSlrY1Z+Yg7TCZLS5677+6xFo+b+rnF6VW8XZQc/2F9MYlxyGAj5
 30R/Q0ck
 =410H
 -----END PGP SIGNATURE-----

Merge tag '5.0-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs fixes from Steve French:
 "A set of cifs/smb3 fixes, 4 for stable, most from Pavel. His patches
  fix an important set of crediting (flow control) problems, and also
  two problems in cifs_writepages, ddressing some large i/o and also
  compounding issues"

* tag '5.0-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: update internal module version number
  CIFS: Fix error paths in writeback code
  CIFS: Move credit processing to mid callbacks for SMB3
  CIFS: Fix credits calculation for cancelled requests
  cifs: Fix potential OOB access of lock element array
  cifs: Limit memory used by lock request calls to a page
  cifs: move large array from stack to heap
  CIFS: Do not hide EINTR after sending network packets
  CIFS: Fix credit computation for compounded requests
  CIFS: Do not set credits to 1 if the server didn't grant anything
  CIFS: Fix adjustment of credits for MTU requests
  cifs: Fix a tiny potential memory leak
  cifs: Fix a debug message
2019-01-14 05:43:40 +12:00
Olof Johansson
465612178b Late reset controller changes for v5.0
This adds missing deassert functionality to the ARC HSDK reset driver,
 fixes some indentation and grammar issues in the kernel docs, adds a
 helper to count the number of resets on a device for the non-DT case
 as well, adds an early reset driver for SoCFPGA and simple reset driver
 support for Stratix10, and generalizes the uniphier USB3 glue layer
 reset to also cover AHCI.
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYIADUWIQRRO6F6WdpH1R0vGibVhaclGDdiwAUCXDTOiBcccC56YWJlbEBw
 ZW5ndXRyb25peC5kZQAKCRDVhaclGDdiwMnMAP9u9pJr0g6t/8NwiDNQGYIupFMQ
 vH3hIUP7pwkELeN36AEAuFJG66r1Y96icDQCLn9x6vxwgTDmJGgGHM3CWEftsQI=
 =vFwq
 -----END PGP SIGNATURE-----

Merge tag 'reset-for-5.0-rc2' of git://git.pengutronix.de/git/pza/linux into fixes

Late reset controller changes for v5.0

This adds missing deassert functionality to the ARC HSDK reset driver,
fixes some indentation and grammar issues in the kernel docs, adds a
helper to count the number of resets on a device for the non-DT case
as well, adds an early reset driver for SoCFPGA and simple reset driver
support for Stratix10, and generalizes the uniphier USB3 glue layer
reset to also cover AHCI.

* tag 'reset-for-5.0-rc2' of git://git.pengutronix.de/git/pza/linux:
  reset: uniphier-glue: Add AHCI reset control support in glue layer
  dt-bindings: reset: uniphier: Add AHCI core reset description
  reset: uniphier-usb3: Rename to reset-uniphier-glue
  dt-bindings: reset: uniphier: Replace the expression of USB3 with generic peripherals
  ARM: socfpga: dts: document "altr,stratix10-rst-mgr" binding
  reset: socfpga: add an early reset driver for SoCFPGA
  reset: fix null pointer dereference on dev by dev_name
  reset: Add reset_control_get_count()
  reset: Improve reset controller kernel docs
  ARC: HSDK: improve reset driver

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-12 22:06:54 -08:00
Olof Johansson
56acb3ef76 mvebu fixes for 5.0
They are all device tree fixes which also worth being in stable:
 
  - Reserve PSCI area on Armada 7K/8K preventing the kernel accessing
    this area and crashing while doing it.
 
  - Use correct PCIe reset signal on MACCHIATOBin  (Armada 8040 based)
 
  - Fix polarity of GPIO fan line D-Link DNS NASes(kikwood based)
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQYqXDMF3cvSLY+g9cLBhiOFHI71QUCXDjK7AAKCRALBhiOFHI7
 1eZfAJ0X/MrjG/MB1NSlJ2kUGmBs5MnnswCdFZpNF4okkjtwyWoCoBsp9X3kUkw=
 =vYNz
 -----END PGP SIGNATURE-----

Merge tag 'mvebu-fixes-5.0-1' of git://git.infradead.org/linux-mvebu into fixes

mvebu fixes for 5.0

They are all device tree fixes which also worth being in stable:

 - Reserve PSCI area on Armada 7K/8K preventing the kernel accessing
   this area and crashing while doing it.

 - Use correct PCIe reset signal on MACCHIATOBin  (Armada 8040 based)

 - Fix polarity of GPIO fan line D-Link DNS NASes(kikwood based)

* tag 'mvebu-fixes-5.0-1' of git://git.infradead.org/linux-mvebu:
  ARM: dts: kirkwood: Fix polarity of GPIO fan lines
  arm64: dts: marvell: mcbin: fix PCIe reset signal
  arm64: dts: marvell: armada-ap806: reserve PSCI area

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-12 22:03:59 -08:00
Olof Johansson
2ec472edcd Fixes for the Integrator:
- Handle failed allocations in the IM/PC bus attachment.
 - Use struct_size() for allocation.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJcOLBYAAoJEEEQszewGV1z3WcQAMKbccIrX5DNX8q1Z2a2kCuh
 H3WNS1XxcTF2CfBseiK1TizQ6xpBLPrcN4aCRCsbv1rzo5YdhZgGlNYyX1rtLf9z
 8CsRQSFjX7Tx/nrMqULjKfXfqqbXQeA1vPVR1p/FIod8hySmZ4zJbHCB33v4M3nz
 hcNJfxHZO/C4FkF1LHLMKNFGUOccf+ipr/n4o2FmTjFqmAvtR9vd9Y09fvsjiw7+
 S8Bcy1ZPO2hbMSroLdv+7IgkRuiE6/53TNBbZwSrxOPg5vEhkl3Iq+L7COU0274l
 E/9xQcfGkrHpRBfuug0rUG5vS5reyk2qPTDOpneJT9811aRCzhJOsxdz/azTQsM6
 e0LdDWxoOK28ZTKhbpE4ZKRXXNIc1E3famgnsw/g5AbWgQaownd7pBb3xPFYocnN
 Q+Uq9luYXqC/SFbR4skdUB7FHdMkf+flKrIvPJ3SLzQbesLBGXveUufRO+BuUemn
 aYy0oQsvzhwBwZIshZ6bf8FYmh+NWYyP4L+GLx9fwH0M8zwiZFzwmKJOgCy+xC05
 /7Ip/N84rQI/9/7j7vYZD+n6RJQtl73T/G19oAgf8uuKD1BoYG3mMhfo7Ax2p82I
 bOte4RBLMOmQphPO5dQSgCwljJxFhT+Qr4oVkW0RwUx66St8SNN2ZYzo/KDMAkdK
 1qUKIBNL/RGyTnCcq82g
 =KT88
 -----END PGP SIGNATURE-----

Merge tag 'integrator-fixes-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into fixes

Fixes for the Integrator:
- Handle failed allocations in the IM/PC bus attachment.
- Use struct_size() for allocation.

* tag 'integrator-fixes-armsoc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  ARM: integrator: impd1: use struct_size() in devm_kzalloc()
  gpio: pl061: handle failed allocations

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-12 22:03:18 -08:00
Olof Johansson
431a8b73de Amlogic DT fixes for v5.0-rc
- arm64: defconfig: enable modules for amlogic s400 sound card
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEe4dGDhaSf6n1v/EMWTcYmtP7xmUFAlw33aQACgkQWTcYmtP7
 xmUN0BAApkqLjZgPdhX8E6avu6xjY1cx36mRf0vN+PFmbPlhb4gHgFaBiZozS1mp
 KFk+/xwT7dWALbkeXpEQXiwf1bddW7YgR0XRMFyutpd02HDOP5lvVFcq+VGl+q3C
 bclAF5rL5hQhZEw1MP/fwJHrKDqrLgLTaNxWguIxsmlzkwptAtQQ0mC3oNoAleZA
 TfWT8eBDc4WOLR3VTL+CvR8LKwDqfQ7/Gm7gZwRolbUzmk/85WtlspbrTcqSTq/5
 Bf7V+oRLNS7OExBU/fnBnWLD8mrNf2s5NHGBwyx3rFiFyCz2D4pinE3tqiqQVcag
 mqB85viURw49KkRA9rJXto9rCqjXeaiU5TnXcROrHTYGZkQYFH8W/uvoCDA+rvdD
 ZWFD1aFV6moCPO3dtNf2QSE7vggu9fFL0tJPiodxNCnSlqcL/xCznTKENmct/t/z
 PDQJ4IbVrrY/COQB7Lf6VZKhtQA3ksAG5FOycTeHVK9yNiJq8u+xAbYmr3Yec2QY
 rnZW4N4TCORxGWXcmwMBQtZZdxuWHx28gNQPwv1NkBo/UcTHW409ZCiv3uBvrmh3
 J+tkgtue1eLONp/1/NNoBN1JmmY5kOty3tz57m9Wt2q+T9lQ9Z8eREvOfza0Y1TI
 kMB5ikv2wQNg09b0hGteeZla+shbAPGtzm1kYb6St15jkHSvy3k=
 =uG2R
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes

Amlogic DT fixes for v5.0-rc
- arm64: defconfig: enable modules for amlogic s400 sound card

* tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  arm64: defconfig: enable modules for amlogic s400 sound card

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-12 22:02:28 -08:00
Olof Johansson
f4f8aa6de3 Qualcomm Driver Fixes for 5.0-rc1
* Add required includes into qcom_scm.h
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcN9AYAAoJEFKiBbHx2RXVt1YQAL5YRK5J6JTDgBhwrQnpq1XV
 4IoJ9mMtbwLPAUTizjnFdkJeyaLvea+/B9mtLWYG2ET3WgxR7tWSKUwlzSxxOcyq
 nj23rdJt6kP0ltCqDqBTJ41i6qA6/Wb3IXAXX1fe57Jyg9iWOW3DjBlHZogN0yl9
 0/RCW0vG5WJ1tO4idLmsjri2bfIZCoAxfrSZSXTBZmwQsbO4RtAPmpU/ZYW9IeTU
 NfHtnEd3YNzF9QiAGDvZ2v+mB8Yr3PZ4O3PottkfecxNTCZywz5V/7hBOmoDyhWX
 W5Fiwy8JBDg2Rc3zaiaXgAiMh4upxBQ1T4D1iGKB19y1aV2NFx3dZQFoyCfMrD84
 r/cu0my///v/AU5MYoGju5f1Nx8yYvYlJ1aZ+OJ5Efq08/1VCeOUvy107PBH+jA9
 nOxmILuXr4ft+k3NjtQ81gYyugXIy8YZIt4MLJoNEoOFDsKZ3lmuJjDdG+1uUqFo
 wUL76ZZuHhQiCtzfJYVTNc/ntxuDWUxnts+GfJB8bhfvv3MNaJPLwbs5lCXRAfCZ
 lI1F522x3s4pYxCFV/w50u5cyIyViaW/EZJ6ZIIPwRaAXrxdAxglhSNo6SJ4IRwG
 XGmdECejGmxZRXY6OcF+rZPzlF7QAD2ptVR3n4i2ij7ge7If5iPpIZWwLHQ7I25m
 PlqLCJoPAd9d999jIpuO
 =v8pH
 -----END PGP SIGNATURE-----

Merge tag 'qcom-fixes-for-5.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into fixes

Qualcomm Driver Fixes for 5.0-rc1

* Add required includes into qcom_scm.h

* tag 'qcom-fixes-for-5.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
  qcom-scm: Include <linux/err.h> header

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-12 22:01:49 -08:00
Olof Johansson
98a5f67311 This pull request fixes some more regressions on legacy
DaVinci board support due to GPIO driver clean-up introduced
 in v4.20 kernel. These are marked for stable.
 
 Also has fixes for some long standing Audio issues on DA850
 boards.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJcN0VpAAoJEGFBu2jqvgRNbQUP/ih8PLa5XdRwBEDPNP+qvN0R
 oalwzzaJ/Bx04+ZrpFiUWSb49gxnwfKjSXSpI/dczuzYUR/DKobUnghaH9J/RvGL
 EaAXRBgVzukXIbEwcXVyG5nJ/FaIjZs4xdwcd9iJXy3j0NZVFk8LX5aEMRL4pmC0
 zVpHk2yKvygXWetod1z965x3FRTeYIFPksv63CfyON+P8gd9wB0/myWL/nVuGbYE
 WAM+7b4TqlfI6fUI3fkHlaTV+gxd4fBzbCBcP/K4FKsSELHxnsm1SDyRNB+ZS+hT
 jDa2In8wuec7IjTiC5nYzFVSv1EV6nk5977AsAY1JP82xWNHB3XGVkxTv/Btw4Vv
 0VdHjpM7Sb+yo38kwbgS5oF5bAXCwLq5FG4I+K2AJfXy1K76hbgbiSXsYQJaO2NI
 E0di4Rlh5CJxMYg7/bu2Ox5s8Eku0y18IvOqYybat9C0rxEmI8jyC5g6OjO9iLZu
 NKpaUdjCv0+ZYtdFkSw9Ke4DdxZaaAyvMk/UdX55+JF2G1Ey5FgxcxcMcavrg1fB
 r7dDGIp08MCSRTO9PdLtO/rsvOkV0wukIIlcXaMWxplrDsOpKm44gDkrWNC3awiI
 7/K8QB8IlJB1PJs1d1YhRT9K/WUZZcn/DIlTIWOrbmJwbik0K4iwqK8dpMbQ7tQm
 SWiC89UI+5Yv+LVWDCNO
 =iyBf
 -----END PGP SIGNATURE-----

Merge tag 'davinci-fixes-for-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes

This pull request fixes some more regressions on legacy
DaVinci board support due to GPIO driver clean-up introduced
in v4.20 kernel. These are marked for stable.

Also has fixes for some long standing Audio issues on DA850
boards.

* tag 'davinci-fixes-for-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: dts: da850-lcdk: Correct the sound card name
  ARM: dts: da850-lcdk: Correct the audio codec regulators
  ARM: dts: da850-evm: Correct the sound card name
  ARM: dts: da850-evm: Correct the audio codec regulators
  ARM: davinci: omapl138-hawk: fix label names in GPIO lookup entries
  ARM: davinci: dm644x-evm: fix label names in GPIO lookup entries
  ARM: davinci: dm355-evm: fix label names in GPIO lookup entries
  ARM: davinci: da850-evm: fix label names in GPIO lookup entries
  ARM: davinci: da830-evm: fix label names in GPIO lookup entries

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-12 22:00:36 -08:00
Olof Johansson
70bf439a94 Renesas ARM Based SoC Fixes for v5.0
Renesas SoCs:
 * Fix build regressions caused by move of Kconfig symbols
 
 RZ/G2E (r8a774c0) SoC:
 * Correct initialization order of 3DG-{A,B} in SYSC driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAlw3Gy4ACgkQ189kaWo3
 T75DKw/+O/3Tes6jMnBgw+QdSKuN0o1Ivmrs0BktpRtqOM6b0WUbSC3Jf3DkRece
 IwJSoDjS378rMciLkl/oBLTzTpTBqWN5aYg4nbcCbTETFTHULOo7AFNiJ6JYlS1T
 IrrtNxGqfxw76rcc7TjZ7KEh+tffXMii8BOHXXJXxBzt+t26SQbnrKjK63pmFBig
 gbGQNjFSwt7g0l/hghHArGLw5BVZOyEyFcdKyX2zRVu6amMohKH1o+Olx4pcpGUf
 bx0NdCpFUZumNCk62A4avSoLZ6hprodd7JhKGLPEoGWtIKZN601w1ckpmxW87T3U
 r2TklTsAjRjE67srAp7Ib269mJq7PFaZdw3sL7wt4BUS+dP0mihOIhMUqQZKo0On
 FgQauoGbWGR2vzVHYlU/cahMEqfOeU24pJ9s5e/zSKNKQMVqTRe+F4f/FHSyhwtX
 z3b6pv5gfwJYMmjkYDI62z43FsCqc10Q9C5VCT0Z4ezYdJdu22CqxcbdR5XTuca6
 m6WDG4R9HRCKQgB2G7sjqtSZfCP0coTA9nNBT2nH6dh7jFaiFNstQdlVcSLwlXI0
 hfuoymFi/nCdIIO70ASId6t5h80/mAmE6nk/QL7M0GLi1hplWbSDVOez9Atx6YGz
 PcQvdQf27el6K66R4AzmkmTImMCKOl/xwpycz4niTqFUpnT7nTI=
 =zkaU
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Renesas ARM Based SoC Fixes for v5.0

Renesas SoCs:
* Fix build regressions caused by move of Kconfig symbols

RZ/G2E (r8a774c0) SoC:
* Correct initialization order of 3DG-{A,B} in SYSC driver

* tag 'renesas-fixes-for-v5.0' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: r8a774c0-sysc: Fix initialization order of 3DG-{A,B}
  ARM: shmobile: fix build regressions

Signed-off-by: Olof Johansson <olof@lixom.net>
2019-01-12 21:59:42 -08:00
John Hubbard
e170672040 phy: fix build breakage: add PHY_MODE_SATA
Commit 49e54187ae ("ata: libahci_platform: comply to PHY framework") uses
the PHY_MODE_SATA, but that enum had not yet been added. This caused a
build failure for me, with today's linux.git.

Also, there is a potentially conflicting (mis-named) PHY_MODE_SATA, hiding
in the Marvell Berlin SATA PHY driver.

Fix the build by:

    1) Renaming Marvell's defined value to a more scoped name,
       in order to avoid any potential conflicts: PHY_BERLIN_MODE_SATA.

    2) Adding the missing enum, which was going to be added anyway as part
       of [1].

[1] https://lkml.kernel.org/r/20190108163124.6409-3-miquel.raynal@bootlin.com

Fixes: 49e54187ae ("ata: libahci_platform: comply to PHY framework")

Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Acked-by: Olof Johansson <olof@lixom.net>
Cc: Grzegorz Jaszczyk <jaz@semihalf.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-01-12 21:07:14 -08:00
Linus Torvalds
b8c3b8992f for-linus-20190112
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAlw6VoIQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgptaHD/wLDzVDkptMK7Essk73vjBaz6w2MYl/Bvb4
 2YtktHlrCB8S/0Xze7t5tvsGxym2fv1ymsV48Sdnl+lW+2tf6e3LJEfAp7yLWoEs
 K6UdFkhYK7fdKx84dHIcslvyY0id9qjRteRiFHrd/023N4FZDkbKOtfeRBZi7e4Q
 yTP2FzQEnSV5a0ngh9J+xxHUXF7a4LfeVj9ddhwcBIAeJ1MUfLTaHxRR8Qc3nw3F
 7nGvLHu2vrWK3EDBBA/PsBqMJhsoW2AV0G7Xbv6Ai7e14GWVYr+MGjIYC41yIlRm
 46oBoveIRI5dkhR5/mO685vB774yAN6RExOP9Xlg/cA3XxbpdWP9uDtfRbuvo64O
 WOm2btWKjxOldCao4wClaJARcjSyocPTKwlWQE7OfVcN+3WbsD26sd+GdCvrSG7a
 +E3xcyPUURN1e7t4YyDGDL1wKBPuZP6jvcGUfoqLMr3O12aIjlAiJFPhm1Hqv+dA
 KaJjsCwShSDJfeWLvP/Lt1KtVoBinrKA/5qkkB7zJA7I+qNP7bAR25BtuXKo1U7t
 5vRGk7rfvdtsE5oH7y1we9AxoA7jD6t5Z60mPRdkVaXzi9SSw3th/YAuUhcU2g0V
 0I2icAGQI8bbZzFgJe+d4f1L57EQ/7fWfcwENNLkLu57E/gZlYYqt//tSrF8W0ur
 wcthJWqOZg==
 =OFV3
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-20190112' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:

 - NVMe pull request from Christoph, with little fixes all over the map

 - Loop caching fix for offset/bs change (Jaegeuk Kim)

 - Block documentation tweaks (Jeff, Jon, Weiping, John)

 - null_blk zoned tweak (John)

 - ahch mvebu suspend/resume support. Should have gone into the merge
   window, but there was some confusion on which tree had it. (Miquel)

* tag 'for-linus-20190112' of git://git.kernel.dk/linux-block: (22 commits)
  ata: ahci: mvebu: request PHY suspend/resume for Armada 3700
  ata: ahci: mvebu: add Armada 3700 initialization needed for S2RAM
  ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs
  ata: ahci: mvebu: remove stale comment
  ata: libahci_platform: comply to PHY framework
  loop: drop caches if offset or block_size are changed
  block: fix kerneldoc comment for blk_attempt_plug_merge()
  nvme: don't initlialize ctrl->cntlid twice
  nvme: introduce NVME_QUIRK_IGNORE_DEV_SUBNQN
  nvme: pad fake subsys NQN vid and ssvid with zeros
  nvme-multipath: zero out ANA log buffer
  nvme-fabrics: unset write/poll queues for discovery controllers
  nvme-tcp: don't ask if controller is fabrics
  nvme-tcp: remove dead code
  nvme-pci: fix out of bounds access in nvme_cqe_pending
  nvme-pci: rerun irq setup on IO queue init errors
  nvme-pci: use the same attributes when freeing host_mem_desc_bufs.
  nvme-pci: fix the wrong setting of nr_maps
  block: doc: add slice_idle_us to bfq documentation
  block: clarify documentation for blk_{start|finish}_plug
  ...
2019-01-12 13:40:51 -08:00
Linus Torvalds
66c56cfa64 remove dma_zalloc_coherent
We've always had a weird situation around dma_zalloc_coherent.  To
 safely support mapping the allocations to userspace major architectures
 like x86 and arm have always zeroed allocations from dma_alloc_coherent,
 but a couple other architectures were missing that zeroing either always
 or in corner cases.  Then later we grew anothe dma_zalloc_coherent
 interface to explicitly request zeroing, but that just added __GFP_ZERO
 to the allocation flags, which for some allocators that didn't end
 up using the page allocator ended up being a no-op and still not
 zeroing the allocations.
 
 So for this merge window I fixed up all remaining architectures to zero
 the memory in dma_alloc_coherent, and made dma_zalloc_coherent a no-op
 wrapper around dma_alloc_coherent, which fixes all of the above issues.
 
 dma_zalloc_coherent is now pointless and can go away, and Luis helped
 me writing a cocchinelle script and patch series to kill it, which I
 think we should apply now just after -rc1 to finally settle these
 issue.
 -----BEGIN PGP SIGNATURE-----
 
 iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAlw6LV0LHGhjaEBsc3Qu
 ZGUACgkQD55TZVIEUYPd1hAAshbVLVIUg750CQoKD5sk44/IW7klkQUnzcp9ueOY
 /GIYS/ils8q9DSITAyMJxHKpjt1EEVlavWLvYLlfpkDfLaVGMUJu+zKGaolhU5F6
 OuldJKZV6tWrC7zGVl+09y5CAyelVxLyuD09I+QYnHUIO9ljgZHB2+W3ezOFxBRD
 FjrQRuFY6Xpr1F42zWc4aJrgACffH761pLx3fbJlIs8aEInWKqDbuyL6Lg71BRXh
 kHKt0DQxFxklyQmqaYyDesujjXUysweAFLNxgN9GSrlWBR8GE3qJpsSrIzjX5k8w
 WKzbypYqVQepI3zYCN5EoCAoiHBFZXPSNHCoXAH6tHjYwgQ3uoDpzxEKJOEykO4i
 1+kcJh3ArQZA/BsMBf3I/CNMsxvBuC3/QKFMcs/7pKx1ABoumSBSIpqB4pG4NU+o
 fxRBHKjqbILufWKReb2PuRXiPpddwuo0vg70U0FK2aWZrClRYEpBdExPKrBUAG34
 WtQCGA0YFXV/kAgPPmOvnPlwpYM2ZrVLVl5Ct2diR5QaLee3o1GiStQm0LuspRzk
 HSzVyCYdKRxH4zkEBzKUn/PuyYLoMRyPP4PQ3R/xlQrFqvv6FeiGYnow89+1JpUp
 2qWg5vU1aLM7/WXnyVGDED3T42eZREi/uMPQIADXqRIVC7e43/eKcLF06n0lIWh9
 usg=
 =VIBB
 -----END PGP SIGNATURE-----

Merge tag 'remove-dma_zalloc_coherent-5.0' of git://git.infradead.org/users/hch/dma-mapping

Pull dma_zalloc_coherent() removal from Christoph Hellwig:
 "We've always had a weird situation around dma_zalloc_coherent. To
  safely support mapping the allocations to userspace major
  architectures like x86 and arm have always zeroed allocations from
  dma_alloc_coherent, but a couple other architectures were missing that
  zeroing either always or in corner cases.

  Then later we grew anothe dma_zalloc_coherent interface to explicitly
  request zeroing, but that just added __GFP_ZERO to the allocation
  flags, which for some allocators that didn't end up using the page
  allocator ended up being a no-op and still not zeroing the
  allocations.

  So for this merge window I fixed up all remaining architectures to
  zero the memory in dma_alloc_coherent, and made dma_zalloc_coherent a
  no-op wrapper around dma_alloc_coherent, which fixes all of the above
  issues.

  dma_zalloc_coherent is now pointless and can go away, and Luis helped
  me writing a cocchinelle script and patch series to kill it, which I
  think we should apply now just after -rc1 to finally settle these
  issue"

* tag 'remove-dma_zalloc_coherent-5.0' of git://git.infradead.org/users/hch/dma-mapping:
  dma-mapping: remove dma_zalloc_coherent()
  cross-tree: phase out dma_zalloc_coherent() on headers
  cross-tree: phase out dma_zalloc_coherent()
2019-01-12 10:52:40 -08:00
Linus Torvalds
473348891c KVM fixes for 5.0-rc2
Minor fixes for new code, corner cases, and documentation.
 Patches are isolated and sufficiently described by the shortlog.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEj/xJEkTHTJzZE/FJQP/qGw8qh+gFAlw52x0ACgkQQP/qGw8q
 h+iejgf+NjD3jXCYAxLtGInXyQEwqw113Gr8941oC2E50CifTqrFhWNkRgl+GyCS
 x92SCiNS1xpy+SnUZDj63MjsB90zOOogPG+RYsSE+BAN/i/9IiE2F5aYSXlen0rR
 SOOfraQTDlS5rOp9auGMNlNWkmEKCO6YEsdmlNte/QVNuy4vrHfAJDvdfCUiC0qO
 XJWMjIyZElsKJUtmZzKuTrCZniBvqn6yGH+/0kggrzDPPIHU+M7qSkMkAC7wqrFy
 0zaeKNloArFLKlDQPQ3AykgxCrp6CJnXuR/Oo6R5rn9jF2kVdlzglx7pHBAc5OGp
 wI+VDWRA2x2JevWcIdsN2Xp2vaCRGw==
 =L1zP
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Radim Krčmář:
 "Minor fixes for new code, corner cases, and documentation"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  x86/kvm/nVMX: don't skip emulated instruction twice when vmptr address is not backed
  Documentation/virtual/kvm: Update URL for AMD SEV API specification
  KVM/VMX: Avoid return error when flush tlb successfully in the hv_remote_flush_tlb_with_range()
  kvm: sev: Fail KVM_SEV_INIT if already initialized
  KVM: validate userspace input in kvm_clear_dirty_log_protect()
  KVM: x86: Fix bit shifting in update_intel_pt_cfg
2019-01-12 10:39:43 -08:00
Linus Torvalds
7b5c8f5226 drm-fixes for 5.0-rc2, part 2
nouveau:
 one backlight, falcon register access, and a fan fix.
 
 i915:
 - Disable PSR for Apple panels
 - Broxton ERR_PTR error state fix
 - Kabylake VECS workaround fix
 - Unwind failure on pinning the gen7 ppgtt
 - GVT workload request allocation fix
 
 core:
 - Fix fb-helper to work correctly with SDL 1.2 bugs.
 - Fix lockdep warning in the atomic ioctl and setproperty.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEb4nG6jLu8Y5XI+PfTA9ye/CYqnEFAlw5IEcACgkQTA9ye/CY
 qnFrLw/9G9cEKiM9ZPspa5ovEi1S1lwUaKD5JWJckaLzbNIkDFDpfbV0X8An+IOt
 L0Db/cdtsBZ67Ci+QrUk60Zy36dFRChDafCP41U2nZtn5iel9v474fys13ZFwtWa
 znyvb5trPEB+76Sc3YDQuK2Aapr/NDowm993qkCJq8euQboFI6jfC7Ib/+zrsZjz
 7OErdKVSkxPT8hEeQq6DkuB0hDMCvb9V/Gu0pzYn+Tb5ECl6ZTSSjf4bxhQ8qG6x
 P+rPQLcymgG+OhYuHn19rh1Y/3NPJnDN4lgZ5HOKVyvKIfjLGuZwriZ5e53sbgWw
 sjBD/9tSHSSRH3Taj4yVWw/XcwIH9YnUmaMAPe35bQmweYjMILlrkWEIGC+g4loi
 aebq66x2LWZ4tqiGu5flNfXPnLYJqnvaA8z4vEPdtwAN/JsrbRD3lUWkVV5Ydvdq
 KFQnrzCXuDWf8UjmW70utvkW+pxK155Xb/3IqivF8tpoz+jC+NeXqp7cts9gOJkj
 UZv842gymFJ0yQ3ZhjFJKc2aAe2eKtq8lJiCDzVA0uwg2ddebi2ttJTo6rH9ze58
 XEhywCGptMKOOYsCDzzkqAGNTkOajd88d1/HCrwWeHW6SIfEfHPsYliC6O9ZzgLM
 xO1/JGF7PrlggtzM+rffVgh2lVFKQxErUZkPPkecUj42XjnX+is=
 =7xM2
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2019-01-11-1' of git://anongit.freedesktop.org/drm/drm

Pull more drm fixes from Daniel Vetter:
 "Dave sends out his pull, everybody remembers holidays are over :-)

  Since Dave's already in weekend mode and it was quite a few patches I
  figured better to apply all the pulls and forward them to you. Hence
  here 2nd part of bugfixes for -rc2.

  nouveau:
   - backlight fix
   - falcon register access fix
   - fan fix.

  i915:
   - Disable PSR for Apple panels
   - Broxton ERR_PTR error state fix
   - Kabylake VECS workaround fix
   - Unwind failure on pinning the gen7 ppgtt
   - GVT workload request allocation fix

  core:
   - Fix fb-helper to work correctly with SDL 1.2 bugs
   - Fix lockdep warning in the atomic ioctl and setproperty"

* tag 'drm-fixes-2019-01-11-1' of git://anongit.freedesktop.org/drm/drm:
  drm/nouveau/falcon: avoid touching registers if engine is off
  drm/nouveau: Don't disable polling in fallback mode
  drm/nouveau: register backlight on pascal and newer
  drm: Fix documentation generation for DP_DPCD_QUIRK_NO_PSR
  drm/i915: init per-engine WAs for all engines
  drm/i915: Unwind failure on pinning the gen7 ppgtt
  drm/i915: Skip the ERR_PTR error state
  drm/i915: Disable PSR in Apple panels
  gpu/drm: Fix lock held when returning to user space.
  drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock
  drm/fb-helper: Partially bring back workaround for bugs of SDL 1.2
  drm/i915/gvt: Fix workload request allocation before request add
2019-01-12 10:30:43 -08:00
Miquel Raynal
bde0b5c109 ata: ahci: mvebu: request PHY suspend/resume for Armada 3700
A feature has been added in the libahci driver: the possibility to set
a new flag in hpriv->flags to let the core handle PHY suspend/resume
automatically. Make use of this feature to make suspend to RAM work
with SATA drives on A3700.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:51 -07:00
Miquel Raynal
2f558bc3f3 ata: ahci: mvebu: add Armada 3700 initialization needed for S2RAM
A3700 comphy initialization is done in the firmware (TF-A). Looking at
the SATA PHY initialization routine, there is a comment about "vendor
specific" registers. Two registers are mentioned. They are not
initialized there in the firmware because they are AHCI related, while
the firmware at this location does only PHY configuration. The
solution to avoid doing such initialization is relying on U-Boot.

While this work at boot time, U-Boot is definitely not going to run
during a resume after suspending to RAM.

Two possible solutions were considered:
* Fixing the firmware.
* Fixing the kernel driver.

The first solution would take ages to propagate, while the second
solution is easy to implement as the driver as been a little bit
reworked to prepare for such platform configuration. Hence, this patch
adds an Armada 3700 configuration function to set these two registers
both at boot time (in the probe) and after a suspend (in the resume
path).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:50 -07:00
Miquel Raynal
96dbcb40e4 ata: ahci: mvebu: do Armada 38x configuration only on relevant SoCs
At the beginning, only Armada 38x SoCs where supported by the
ahci_mvebu.c driver. Commit 15d3ce7b63 ("ata: ahci_mvebu: add
support for Armada 3700 variant") introduced Armada 3700 support. As
opposed to Armada 38x SoCs, the 3700 variants do not have to configure
mbus and the regret option. This patch took care of avoiding such
configuration when not needed in the probe function, but failed to do
the same in the resume path. While doing so looks harmless by
experience, let's clean the driver logic and avoid doing this useless
configuration with Armada 3700 SoCs.

Because the logic is very similar between these two places, it has
been decided to factorize this code and put it in a "Armada 38x
configuration function". This function is part of a new
(per-compatible) platform data structure, so that the addition of such
configuration function for Armada 3700 will be eased.

Fixes: 15d3ce7b63 ("ata: ahci_mvebu: add support for Armada 3700 variant")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:48 -07:00
Miquel Raynal
c9bc136791 ata: ahci: mvebu: remove stale comment
For Armada-38x (32-bit) SoCs, PM platform support has been added since:
commit 32f9494c9d ("ARM: mvebu: prepare pm-board.c for the
                      introduction of Armada 38x support")
commit 3cbd6a6ca8 ("ARM: mvebu: Add standby support")

For Armada 64-bit SoCs, like the A3700 also using this AHCI driver, PM
platform support has always existed.

There are even suspend/resume hooks in this driver since:
commit d6ecf15814 ("ata: ahci_mvebu: add suspend/resume support")

Remove the stale comment at the end of this driver stating that all
the above does not exist yet.

Fixes: d6ecf15814 ("ata: ahci_mvebu: add suspend/resume support")
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-01-11 14:47:47 -07:00