/*
 * Internal Header for the Direct Rendering Manager
 *
 * Copyright 2016 Intel Corporation
 *
 * Author: Daniel Vetter <daniel.vetter@ffwll.ch>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */

#ifndef _DRM_AUTH_H_
#define _DRM_AUTH_H_

/**
 * struct drm_master - drm master structure
 *
 * @refcount: Refcount for this master object.
 * @dev: Link back to the DRM device
 * @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex.
 * @unique_len: Length of unique field. Protected by drm_global_mutex.
 * @magic_map: Map of used authentication tokens. Protected by struct_mutex.
 * @lock: DRI lock information.
 * @driver_priv: Pointer to driver-private information.
 *
 * Note that master structures are only relevant for the legacy/primary device
 * nodes, hence there can only be one per device, not one per drm_minor.
 */
struct drm_master {
	struct kref refcount;
	struct drm_device *dev;
	char *unique;
	int unique_len;
	struct idr magic_map;
	struct drm_lock_data lock;
	void *driver_priv;
};

struct drm_master *drm_master_get(struct drm_master *master);
void drm_master_put(struct drm_master **master);
bool drm_is_current_master(struct drm_file *fpriv);

#endif
9ad234778eb8b10ef07d922f435005cf7'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/sound/firewire/amdtp-stream.c'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='40710cf9ad234778eb8b10ef07d922f435005cf7'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?h=nds-private-remove&amp;id=40710cf9ad234778eb8b10ef07d922f435005cf7'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound?h=nds-private-remove&amp;id=40710cf9ad234778eb8b10ef07d922f435005cf7'>sound</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound/firewire?h=nds-private-remove&amp;id=40710cf9ad234778eb8b10ef07d922f435005cf7'>firewire</a>/<a href='/cgit.cgi/linux/net-next.git/log/sound/firewire/amdtp-stream.c?h=nds-private-remove&amp;id=40710cf9ad234778eb8b10ef07d922f435005cf7'>amdtp-stream.c</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/sound/firewire/amdtp-stream.c?h=nds-private-remove&amp;id=40710cf9ad234778eb8b10ef07d922f435005cf7&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>
m.submit();'><option value='0' selected='selected'>include</option><option value='1'>ignore</option></select></td></tr><tr><td class='label'>mode:</td><td class='ctrl'><select name='dt' onchange='this.form.submit();'><option value='0' selected='selected'>unified</option><option value='1'>ssdiff</option><option value='2'>stat only</option></select></td></tr><tr><td/><td class='ctrl'><noscript><input type='submit' value='reload'/></noscript></td></tr></table></form></div><table summary='commit info' class='commit-info'>
<tr><th>author</th><td>Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;</td><td class='right'>2017-02-03 17:10:28 +1100</td></tr>
<tr><th>committer</th><td>Michael Ellerman &lt;mpe@ellerman.id.au&gt;</td><td class='right'>2017-02-08 23:36:29 +1100</td></tr>
<tr><th>commit</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/sound/drivers?id=d7df2443cd5f67fc6ee7c05a88e4996e8177f91b'>d7df2443cd5f67fc6ee7c05a88e4996e8177f91b</a> (<a href='/cgit.cgi/linux/net-next.git/patch/sound/drivers?id=d7df2443cd5f67fc6ee7c05a88e4996e8177f91b'>patch</a>)</td></tr>
<tr><th>tree</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/tree/?id=d7df2443cd5f67fc6ee7c05a88e4996e8177f91b'>098a7c0ca4fceb8a65cb1f693c9d71990388933d</a> /<a href='/cgit.cgi/linux/net-next.git/tree/sound/drivers?id=d7df2443cd5f67fc6ee7c05a88e4996e8177f91b'>sound/drivers</a></td></tr>
<tr><th>parent</th><td colspan='2' class='oid'><a href='/cgit.cgi/linux/net-next.git/commit/sound/drivers?id=a0615a16f7d0ceb5804d295203c302d496d8ee91'>a0615a16f7d0ceb5804d295203c302d496d8ee91</a> (<a href='/cgit.cgi/linux/net-next.git/diff/sound/drivers?id=d7df2443cd5f67fc6ee7c05a88e4996e8177f91b&amp;id2=a0615a16f7d0ceb5804d295203c302d496d8ee91'>diff</a>)</td></tr></table>
<div class='commit-subject'>powerpc/mm: Fix spurrious segfaults on radix with autonuma</div><div class='commit-msg'>When autonuma (Automatic NUMA balancing) marks a PTE inaccessible it
clears all the protection bits but leave the PTE valid.

With the Radix MMU, an attempt at executing from such a PTE will
take a fault with bit 35 of SRR1 set "SRR1_ISI_N_OR_G".

It is thus incorrect to treat all such faults as errors. We should
pass them to handle_mm_fault() for autonuma to deal with. The case
of pages that are really not executable is handled by the existing
test for VM_EXEC further down.

That leaves us with catching the kernel attempts at executing user
pages. We can catch that earlier, even before we do find_vma.

It is never valid on powerpc for the kernel to take an exec fault
to begin with. So fold that test with the existing test for the
kernel faulting on kernel addresses to bail out early.

Fixes: 1d18ad026844 ("powerpc/mm: Detect instruction fetch denied and report")
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Reviewed-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Acked-by: Balbir Singh &lt;bsingharora@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</div><div class='diffstat-header'><a href='/cgit.cgi/linux/net-next.git/diff/?id=d7df2443cd5f67fc6ee7c05a88e4996e8177f91b'>Diffstat</a> (limited to 'sound/drivers')</div><table summary='diffstat' class='diffstat'>