4.8.0-1.hu.1.pf1
- Merge branch 'f25' of ssh://pkgs.fedoraproject.org/kernel into f24-pf - Step to build kernels for Fedora 25. - Use new pf patch v4.8-pf1 - https://pf.natalenko.name/news/?p=204
This commit is contained in:
commit
308188e85a
|
@ -1,173 +0,0 @@
|
|||
From 8b368e8e961944105945fbe36f3f264252bfd19a Mon Sep 17 00:00:00 2001
|
||||
From: Dan Williams <dan.j.williams@intel.com>
|
||||
Date: Thu, 25 Feb 2016 01:02:30 +0000
|
||||
Subject: [PATCH] mm: CONFIG_NR_ZONES_EXTENDED
|
||||
|
||||
ZONE_DEVICE (merged in 4.3) and ZONE_CMA (proposed) are examples of new mm
|
||||
zones that are bumping up against the current maximum limit of 4 zones,
|
||||
i.e. 2 bits in page->flags. When adding a zone this equation still needs
|
||||
to be satisified:
|
||||
|
||||
SECTIONS_WIDTH + ZONES_WIDTH + NODES_SHIFT + LAST_CPUPID_SHIFT
|
||||
<= BITS_PER_LONG - NR_PAGEFLAGS
|
||||
|
||||
ZONE_DEVICE currently tries to satisfy this equation by requiring that
|
||||
ZONE_DMA be disabled, but this is untenable given generic kernels want to
|
||||
support ZONE_DEVICE and ZONE_DMA simultaneously. ZONE_CMA would like to
|
||||
increase the amount of memory covered per section, but that limits the
|
||||
minimum granularity at which consecutive memory ranges can be added via
|
||||
devm_memremap_pages().
|
||||
|
||||
The trade-off of what is acceptable to sacrifice depends heavily on the
|
||||
platform. For example, ZONE_CMA is targeted for 32-bit platforms where
|
||||
page->flags is constrained, but those platforms likely do not care about
|
||||
the minimum granularity of memory hotplug. A big iron machine with 1024
|
||||
numa nodes can likely sacrifice ZONE_DMA where a general purpose
|
||||
distribution kernel can not.
|
||||
|
||||
CONFIG_NR_ZONES_EXTENDED is a configuration symbol that gets selected when
|
||||
the number of configured zones exceeds 4. It documents the configuration
|
||||
symbols and definitions that get modified when ZONES_WIDTH is greater than
|
||||
2.
|
||||
|
||||
For now, it steals a bit from NODES_SHIFT. Later on it can be used to
|
||||
document the definitions that get modified when a 32-bit configuration
|
||||
wants more zone bits.
|
||||
|
||||
Note that GFP_ZONE_TABLE poses an interesting constraint since
|
||||
include/linux/gfp.h gets included by the 32-bit portion of a 64-bit build.
|
||||
We need to be careful to only build the table for zones that have a
|
||||
corresponding gfp_t flag. GFP_ZONES_SHIFT is introduced for this purpose.
|
||||
This patch does not attempt to solve the problem of adding a new zone
|
||||
that also has a corresponding GFP_ flag.
|
||||
|
||||
Link: https://bugzilla.kernel.org/show_bug.cgi?id=110931
|
||||
Fixes: 033fbae988fc ("mm: ZONE_DEVICE for "device memory"")
|
||||
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
|
||||
Reported-by: Mark <markk@clara.co.uk>
|
||||
Cc: Mel Gorman <mgorman@suse.de>
|
||||
Cc: Rik van Riel <riel@redhat.com>
|
||||
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
|
||||
Cc: Dave Hansen <dave.hansen@linux.intel.com>
|
||||
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
|
||||
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
|
||||
---
|
||||
arch/x86/Kconfig | 6 ++++--
|
||||
include/linux/gfp.h | 33 ++++++++++++++++++++-------------
|
||||
include/linux/page-flags-layout.h | 2 ++
|
||||
mm/Kconfig | 7 +++++--
|
||||
4 files changed, 31 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
|
||||
index 3fef519..b94704a 100644
|
||||
--- a/arch/x86/Kconfig
|
||||
+++ b/arch/x86/Kconfig
|
||||
@@ -1409,8 +1409,10 @@ config NUMA_EMU
|
||||
|
||||
config NODES_SHIFT
|
||||
int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP
|
||||
- range 1 10
|
||||
- default "10" if MAXSMP
|
||||
+ range 1 10 if !NR_ZONES_EXTENDED
|
||||
+ range 1 9 if NR_ZONES_EXTENDED
|
||||
+ default "10" if MAXSMP && !NR_ZONES_EXTENDED
|
||||
+ default "9" if MAXSMP && NR_ZONES_EXTENDED
|
||||
default "6" if X86_64
|
||||
default "3"
|
||||
depends on NEED_MULTIPLE_NODES
|
||||
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
|
||||
index af1f2b2..d201d8a 100644
|
||||
--- a/include/linux/gfp.h
|
||||
+++ b/include/linux/gfp.h
|
||||
@@ -329,22 +329,29 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags)
|
||||
* 0xe => BAD (MOVABLE+DMA32+HIGHMEM)
|
||||
* 0xf => BAD (MOVABLE+DMA32+HIGHMEM+DMA)
|
||||
*
|
||||
- * ZONES_SHIFT must be <= 2 on 32 bit platforms.
|
||||
+ * GFP_ZONES_SHIFT must be <= 2 on 32 bit platforms.
|
||||
*/
|
||||
|
||||
-#if 16 * ZONES_SHIFT > BITS_PER_LONG
|
||||
-#error ZONES_SHIFT too large to create GFP_ZONE_TABLE integer
|
||||
+#if defined(CONFIG_ZONE_DEVICE) && (MAX_NR_ZONES-1) <= 4
|
||||
+/* ZONE_DEVICE is not a valid GFP zone specifier */
|
||||
+#define GFP_ZONES_SHIFT 2
|
||||
+#else
|
||||
+#define GFP_ZONES_SHIFT ZONES_SHIFT
|
||||
+#endif
|
||||
+
|
||||
+#if 16 * GFP_ZONES_SHIFT > BITS_PER_LONG
|
||||
+#error GFP_ZONES_SHIFT too large to create GFP_ZONE_TABLE integer
|
||||
#endif
|
||||
|
||||
#define GFP_ZONE_TABLE ( \
|
||||
- (ZONE_NORMAL << 0 * ZONES_SHIFT) \
|
||||
- | (OPT_ZONE_DMA << ___GFP_DMA * ZONES_SHIFT) \
|
||||
- | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * ZONES_SHIFT) \
|
||||
- | (OPT_ZONE_DMA32 << ___GFP_DMA32 * ZONES_SHIFT) \
|
||||
- | (ZONE_NORMAL << ___GFP_MOVABLE * ZONES_SHIFT) \
|
||||
- | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * ZONES_SHIFT) \
|
||||
- | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * ZONES_SHIFT) \
|
||||
- | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * ZONES_SHIFT) \
|
||||
+ (ZONE_NORMAL << 0 * GFP_ZONES_SHIFT) \
|
||||
+ | (OPT_ZONE_DMA << ___GFP_DMA * GFP_ZONES_SHIFT) \
|
||||
+ | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * GFP_ZONES_SHIFT) \
|
||||
+ | (OPT_ZONE_DMA32 << ___GFP_DMA32 * GFP_ZONES_SHIFT) \
|
||||
+ | (ZONE_NORMAL << ___GFP_MOVABLE * GFP_ZONES_SHIFT) \
|
||||
+ | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * GFP_ZONES_SHIFT) \
|
||||
+ | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * GFP_ZONES_SHIFT) \
|
||||
+ | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * GFP_ZONES_SHIFT) \
|
||||
)
|
||||
|
||||
/*
|
||||
@@ -369,8 +376,8 @@ static inline enum zone_type gfp_zone(gfp_t flags)
|
||||
enum zone_type z;
|
||||
int bit = (__force int) (flags & GFP_ZONEMASK);
|
||||
|
||||
- z = (GFP_ZONE_TABLE >> (bit * ZONES_SHIFT)) &
|
||||
- ((1 << ZONES_SHIFT) - 1);
|
||||
+ z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) &
|
||||
+ ((1 << GFP_ZONES_SHIFT) - 1);
|
||||
VM_BUG_ON((GFP_ZONE_BAD >> bit) & 1);
|
||||
return z;
|
||||
}
|
||||
diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h
|
||||
index da52366..77b078c 100644
|
||||
--- a/include/linux/page-flags-layout.h
|
||||
+++ b/include/linux/page-flags-layout.h
|
||||
@@ -17,6 +17,8 @@
|
||||
#define ZONES_SHIFT 1
|
||||
#elif MAX_NR_ZONES <= 4
|
||||
#define ZONES_SHIFT 2
|
||||
+#elif MAX_NR_ZONES <= 8
|
||||
+#define ZONES_SHIFT 3
|
||||
#else
|
||||
#error ZONES_SHIFT -- too many zones configured adjust calculation
|
||||
#endif
|
||||
diff --git a/mm/Kconfig b/mm/Kconfig
|
||||
index 031a329..7826216 100644
|
||||
--- a/mm/Kconfig
|
||||
+++ b/mm/Kconfig
|
||||
@@ -652,8 +652,6 @@ config IDLE_PAGE_TRACKING
|
||||
|
||||
config ZONE_DEVICE
|
||||
bool "Device memory (pmem, etc...) hotplug support"
|
||||
- default !ZONE_DMA
|
||||
- depends on !ZONE_DMA
|
||||
depends on MEMORY_HOTPLUG
|
||||
depends on MEMORY_HOTREMOVE
|
||||
depends on X86_64 #arch_add_memory() comprehends device memory
|
||||
@@ -667,5 +665,10 @@ config ZONE_DEVICE
|
||||
|
||||
If FS_DAX is enabled, then say Y.
|
||||
|
||||
+config NR_ZONES_EXTENDED
|
||||
+ bool
|
||||
+ default n if !64BIT
|
||||
+ default y if ZONE_DEVICE && ZONE_DMA && ZONE_DMA32
|
||||
+
|
||||
config FRAME_VECTOR
|
||||
bool
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -18,15 +18,12 @@ diff --git a/include/linux/efi.h b/include/linux/efi.h
|
|||
index 8cb38cfcba74..8c274b4ea8e6 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -647,6 +647,12 @@ void efi_native_runtime_setup(void);
|
||||
EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, \
|
||||
0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f)
|
||||
@@ -647,6 +647,9 @@ void efi_native_runtime_setup(void);
|
||||
#define LINUX_EFI_ARM_SCREEN_INFO_TABLE_GUID EFI_GUID(0xe03fc20a, 0x85dc, 0x406e, 0xb9, 0x0e, 0x4a, 0xb5, 0x02, 0x37, 0x1d, 0x95)
|
||||
#define LINUX_EFI_LOADER_ENTRY_GUID EFI_GUID(0x4a67b082, 0x0a4c, 0x41cf, 0xb6, 0xc7, 0x44, 0x0b, 0x29, 0xbb, 0x8c, 0x4f)
|
||||
|
||||
+#define EFI_CERT_SHA256_GUID \
|
||||
+ EFI_GUID( 0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28 )
|
||||
+
|
||||
+#define EFI_CERT_X509_GUID \
|
||||
+ EFI_GUID( 0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72 )
|
||||
+#define EFI_CERT_SHA256_GUID EFI_GUID(0xc1c41626, 0x504c, 0x4092, 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28)
|
||||
+#define EFI_CERT_X509_GUID EFI_GUID(0xa5c059a1, 0x94e4, 0x4aa7, 0x87, 0xb5, 0xab, 0x15, 0x5c, 0x2b, 0xf0, 0x72)
|
||||
+
|
||||
typedef struct {
|
||||
efi_guid_t guid;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 0f6eec5ca124baf1372fb4edeacd11a002378f5e Mon Sep 17 00:00:00 2001
|
||||
From 3213f1513a744fb21b6b9e4d4f2650a204855b3e Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Fri, 9 Aug 2013 17:58:15 -0400
|
||||
Subject: [PATCH 01/20] Add secure_modules() call
|
||||
Subject: [PATCH] Add secure_modules() call
|
||||
|
||||
Provide a single call to allow kernel code to determine whether the system
|
||||
has been configured to either disable module loading entirely or to load
|
||||
|
@ -17,10 +17,10 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
|||
2 files changed, 16 insertions(+)
|
||||
|
||||
diff --git a/include/linux/module.h b/include/linux/module.h
|
||||
index 3daf2b3..082298a 100644
|
||||
index 0c3207d..05bd6c9 100644
|
||||
--- a/include/linux/module.h
|
||||
+++ b/include/linux/module.h
|
||||
@@ -655,6 +655,8 @@ static inline bool is_livepatch_module(struct module *mod)
|
||||
@@ -641,6 +641,8 @@ static inline bool is_livepatch_module(struct module *mod)
|
||||
}
|
||||
#endif /* CONFIG_LIVEPATCH */
|
||||
|
||||
|
@ -28,8 +28,8 @@ index 3daf2b3..082298a 100644
|
|||
+
|
||||
#else /* !CONFIG_MODULES... */
|
||||
|
||||
/* Given an address, look for it in the exception tables. */
|
||||
@@ -771,6 +773,10 @@ static inline bool module_requested_async_probing(struct module *module)
|
||||
static inline struct module *__module_address(unsigned long addr)
|
||||
@@ -750,6 +752,10 @@ static inline bool module_requested_async_probing(struct module *module)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,10 @@ index 3daf2b3..082298a 100644
|
|||
|
||||
#ifdef CONFIG_SYSFS
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index 5f71aa6..3c38496 100644
|
||||
index 529efae..0332fdd 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -4199,3 +4199,13 @@ void module_layout(struct module *mod,
|
||||
@@ -4279,3 +4279,13 @@ void module_layout(struct module *mod,
|
||||
}
|
||||
EXPORT_SYMBOL(module_layout);
|
||||
#endif
|
||||
|
@ -59,5 +59,5 @@ index 5f71aa6..3c38496 100644
|
|||
+}
|
||||
+EXPORT_SYMBOL(secure_modules);
|
||||
--
|
||||
2.5.5
|
||||
2.9.2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 16d2ba5d5bc46e67e6aa7a3d113fbcc18c217388 Mon Sep 17 00:00:00 2001
|
||||
From e27a9a98dcf3ff95568593026da065a72ad21b92 Mon Sep 17 00:00:00 2001
|
||||
From: Kyle McMartin <kyle@redhat.com>
|
||||
Date: Fri, 30 Aug 2013 09:28:51 -0400
|
||||
Subject: [PATCH 20/20] Add sysrq option to disable secure boot mode
|
||||
Subject: [PATCH 9/9] Add sysrq option to disable secure boot mode
|
||||
|
||||
Bugzilla: N/A
|
||||
Upstream-status: Fedora mustard
|
||||
|
@ -16,7 +16,7 @@ Upstream-status: Fedora mustard
|
|||
7 files changed, 64 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index f93826b8522c..41679b1aca83 100644
|
||||
index a666b6c29c77..7732c769937b 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -70,6 +70,11 @@
|
||||
|
@ -31,7 +31,7 @@ index f93826b8522c..41679b1aca83 100644
|
|||
#include <video/edid.h>
|
||||
|
||||
#include <asm/mtrr.h>
|
||||
@@ -1261,6 +1266,37 @@ void __init i386_reserve_resources(void)
|
||||
@@ -1286,6 +1291,37 @@ void __init i386_reserve_resources(void)
|
||||
|
||||
#endif /* CONFIG_X86_32 */
|
||||
|
||||
|
@ -70,10 +70,10 @@ index f93826b8522c..41679b1aca83 100644
|
|||
.notifier_call = dump_kernel_offset
|
||||
};
|
||||
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
|
||||
index 345df9b03aed..dea6a6c4a39b 100644
|
||||
index abe1a927b332..f4126fcec10c 100644
|
||||
--- a/drivers/input/misc/uinput.c
|
||||
+++ b/drivers/input/misc/uinput.c
|
||||
@@ -364,6 +364,7 @@ static int uinput_allocate_device(struct uinput_device *udev)
|
||||
@@ -379,6 +379,7 @@ static int uinput_allocate_device(struct uinput_device *udev)
|
||||
if (!udev->dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -82,10 +82,10 @@ index 345df9b03aed..dea6a6c4a39b 100644
|
|||
input_set_drvdata(udev->dev, udev);
|
||||
|
||||
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
|
||||
index 95b330a9ea98..dfa3e154a719 100644
|
||||
index e5139402e7f8..5ef2e04a03ad 100644
|
||||
--- a/drivers/tty/sysrq.c
|
||||
+++ b/drivers/tty/sysrq.c
|
||||
@@ -472,6 +472,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
|
||||
@@ -478,6 +478,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = {
|
||||
/* x: May be registered on mips for TLB dump */
|
||||
/* x: May be registered on ppc/powerpc for xmon */
|
||||
/* x: May be registered on sparc64 for global PMU dump */
|
||||
|
@ -93,7 +93,7 @@ index 95b330a9ea98..dfa3e154a719 100644
|
|||
NULL, /* x */
|
||||
/* y: May be registered on sparc64 for global register dump */
|
||||
NULL, /* y */
|
||||
@@ -515,7 +516,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
|
||||
@@ -521,7 +522,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
|
||||
sysrq_key_table[i] = op_p;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ index 95b330a9ea98..dfa3e154a719 100644
|
|||
{
|
||||
struct sysrq_key_op *op_p;
|
||||
int orig_log_level;
|
||||
@@ -535,11 +536,15 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
@@ -541,11 +542,15 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
|
||||
op_p = __sysrq_get_key_op(key);
|
||||
if (op_p) {
|
||||
|
@ -119,7 +119,7 @@ index 95b330a9ea98..dfa3e154a719 100644
|
|||
pr_cont("%s\n", op_p->action_msg);
|
||||
console_loglevel = orig_log_level;
|
||||
op_p->handler(key);
|
||||
@@ -571,7 +576,7 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
@@ -577,7 +582,7 @@ void __handle_sysrq(int key, bool check_mask)
|
||||
void handle_sysrq(int key)
|
||||
{
|
||||
if (sysrq_on())
|
||||
|
@ -128,7 +128,7 @@ index 95b330a9ea98..dfa3e154a719 100644
|
|||
}
|
||||
EXPORT_SYMBOL(handle_sysrq);
|
||||
|
||||
@@ -652,7 +657,7 @@ static void sysrq_do_reset(unsigned long _state)
|
||||
@@ -658,7 +663,7 @@ static void sysrq_do_reset(unsigned long _state)
|
||||
static void sysrq_handle_reset_request(struct sysrq_state *state)
|
||||
{
|
||||
if (state->reset_requested)
|
||||
|
@ -137,7 +137,7 @@ index 95b330a9ea98..dfa3e154a719 100644
|
|||
|
||||
if (sysrq_reset_downtime_ms)
|
||||
mod_timer(&state->keyreset_timer,
|
||||
@@ -803,8 +808,10 @@ static bool sysrq_handle_keypress(struct sysrq_state *sysrq,
|
||||
@@ -809,8 +814,10 @@ static bool sysrq_handle_keypress(struct sysrq_state *sysrq,
|
||||
|
||||
default:
|
||||
if (sysrq->active && value && value != 2) {
|
||||
|
@ -149,7 +149,7 @@ index 95b330a9ea98..dfa3e154a719 100644
|
|||
}
|
||||
break;
|
||||
}
|
||||
@@ -1084,7 +1091,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
|
||||
@@ -1094,7 +1101,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
|
||||
|
||||
if (get_user(c, buf))
|
||||
return -EFAULT;
|
||||
|
@ -159,7 +159,7 @@ index 95b330a9ea98..dfa3e154a719 100644
|
|||
|
||||
return count;
|
||||
diff --git a/include/linux/input.h b/include/linux/input.h
|
||||
index 82ce323b9986..9e534f228945 100644
|
||||
index 1e967694e9a5..2b56c6f9673c 100644
|
||||
--- a/include/linux/input.h
|
||||
+++ b/include/linux/input.h
|
||||
@@ -42,6 +42,7 @@ struct input_value {
|
||||
|
@ -216,7 +216,7 @@ index 387fa7d05c98..4b07e30b3279 100644
|
|||
int unregister_sysrq_key(int key, struct sysrq_key_op *op);
|
||||
struct sysrq_key_op *__sysrq_get_key_op(int key);
|
||||
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
|
||||
index 4121345498e0..0ff3cef5df96 100644
|
||||
index 2a20c0dfdafc..3d17205dab77 100644
|
||||
--- a/kernel/debug/kdb/kdb_main.c
|
||||
+++ b/kernel/debug/kdb/kdb_main.c
|
||||
@@ -1968,7 +1968,7 @@ static int kdb_sr(int argc, const char **argv)
|
||||
|
@ -229,10 +229,10 @@ index 4121345498e0..0ff3cef5df96 100644
|
|||
|
||||
return 0;
|
||||
diff --git a/kernel/module.c b/kernel/module.c
|
||||
index 2b403ab0ef29..7818c110e95c 100644
|
||||
index ea484f3a35b2..84b00659b0ee 100644
|
||||
--- a/kernel/module.c
|
||||
+++ b/kernel/module.c
|
||||
@@ -292,7 +292,7 @@ static void module_assert_mutex_or_preempt(void)
|
||||
@@ -269,7 +269,7 @@ static void module_assert_mutex_or_preempt(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -242,5 +242,5 @@ index 2b403ab0ef29..7818c110e95c 100644
|
|||
module_param(sig_enforce, bool_enable_only, 0644);
|
||||
#endif /* !CONFIG_MODULE_SIG_FORCE */
|
||||
--
|
||||
2.4.3
|
||||
2.5.5
|
||||
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
From b490a8537df60d449199e162417da74ee9262515 Mon Sep 17 00:00:00 2001
|
||||
From: Yuta Kobayashi <alu.ula@outlook.com>
|
||||
Date: Fri, 12 Aug 2016 07:49:17 +0000
|
||||
Subject: [PATCH] HID: microsoft: Add Surface 4 type cover pro 4 (JP)
|
||||
|
||||
Adding support for the Microsoft Surface 4 Type Cover Pro (JP).
|
||||
|
||||
Signed-off-by: Yuta Kobayashi <alu.ula@outlook.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/hid-core.c | 2 ++
|
||||
drivers/hid/hid-ids.h | 1 +
|
||||
drivers/hid/hid-microsoft.c | 2 ++
|
||||
drivers/hid/usbhid/hid-quirks.c | 1 +
|
||||
4 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index ed10d4f..45400de 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -727,6 +727,7 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
|
||||
(hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 ||
|
||||
hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 ||
|
||||
hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP ||
|
||||
+ hid->product == USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP ||
|
||||
hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
|
||||
hid->product == USB_DEVICE_ID_MS_POWER_COVER) &&
|
||||
hid->group == HID_GROUP_MULTITOUCH)
|
||||
@@ -1982,6 +1983,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_7K) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_600) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index da1c58e..3466f0d 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -713,6 +713,7 @@
|
||||
#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 0x07dc
|
||||
#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 0x07e2
|
||||
#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd
|
||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP 0x07e9
|
||||
#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07de
|
||||
#define USB_DEVICE_ID_MS_POWER_COVER 0x07da
|
||||
|
||||
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
|
||||
index e924d55..56c586f 100644
|
||||
--- a/drivers/hid/hid-microsoft.c
|
||||
+++ b/drivers/hid/hid-microsoft.c
|
||||
@@ -288,6 +288,8 @@ static const struct hid_device_id ms_devices[] = {
|
||||
.driver_data = MS_HIDINPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP),
|
||||
.driver_data = MS_HIDINPUT },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP),
|
||||
+ .driver_data = MS_HIDINPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3),
|
||||
.driver_data = MS_HIDINPUT },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER),
|
||||
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
|
||||
index b4b8c6a..1fccffd 100644
|
||||
--- a/drivers/hid/usbhid/hid-quirks.c
|
||||
+++ b/drivers/hid/usbhid/hid-quirks.c
|
||||
@@ -98,6 +98,7 @@ static const struct hid_blacklist {
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP, HID_QUIRK_NO_INIT_REPORTS },
|
||||
+ { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_JP, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_POWER_COVER, HID_QUIRK_NO_INIT_REPORTS },
|
||||
{ USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL, HID_QUIRK_NO_INIT_REPORTS },
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
From 954d6154959c8c196fa4b89fc98a4fb377c6a38d Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Date: Fri, 8 Jan 2016 17:58:49 +0100
|
||||
Subject: [PATCH] HID: sony: do not bail out when the sixaxis refuses the
|
||||
output report
|
||||
|
||||
When setting the operational mode, some third party (Speedlink Strike-FX)
|
||||
gamepads refuse the output report. Failing here means we refuse to
|
||||
initialize the gamepad while this should be harmless.
|
||||
|
||||
The weird part is that the initial commit that added this: a7de9b8
|
||||
("HID: sony: Enable Gasia third-party PS3 controllers") mentions this
|
||||
very same controller as one requiring this output report.
|
||||
Anyway, it's broken for one user at least, so let's change it.
|
||||
We will report an error, but at least the controller should work.
|
||||
|
||||
And no, these devices present themselves as legacy Sony controllers
|
||||
(VID:PID of 054C:0268, as in the official ones) so there are no ways
|
||||
of discriminating them from the official ones.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1255325
|
||||
|
||||
Reported-and-tested-by: Max Fedotov <thesourcehim@gmail.com>
|
||||
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
|
||||
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
||||
---
|
||||
drivers/hid/hid-sony.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
|
||||
index 661f94f8ab8b..11f91c0c2458 100644
|
||||
--- a/drivers/hid/hid-sony.c
|
||||
+++ b/drivers/hid/hid-sony.c
|
||||
@@ -1411,8 +1411,10 @@ static int sixaxis_set_operational_usb(struct hid_device *hdev)
|
||||
}
|
||||
|
||||
ret = hid_hw_output_report(hdev, buf, 1);
|
||||
- if (ret < 0)
|
||||
- hid_err(hdev, "can't set operational mode: step 3\n");
|
||||
+ if (ret < 0) {
|
||||
+ hid_info(hdev, "can't set operational mode: step 3, ignoring\n");
|
||||
+ ret = 0;
|
||||
+ }
|
||||
|
||||
out:
|
||||
kfree(buf);
|
||||
--
|
||||
2.5.0
|
||||
|
4
Makefile
4
Makefile
|
@ -92,7 +92,6 @@ debug:
|
|||
@perl -pi -e 's/# CONFIG_WQ_WATCHDOG is not set/CONFIG_WQ_WATCHDOG=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set/CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_DEBUG_KMEMLEAK is not set/CONFIG_DEBUG_KMEMLEAK=y/' config-nodebug
|
||||
@perl -pi -e 's/# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set/CONFIG_X86_DEBUG_STATIC_CPU_HAS=y/' config-nodebug
|
||||
|
||||
@# just in case we're going from extremedebug -> debug
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-nodebug
|
||||
|
@ -112,9 +111,6 @@ release: config-release
|
|||
|
||||
include Makefile.release
|
||||
|
||||
unused-kernel-patches:
|
||||
@for f in *.patch; do if [ -e $$f ]; then (egrep -q "^Patch[[:digit:]]+:[[:space:]]+$$f" $(SPECFILE) || echo "Unused: $$f") && egrep -q "^ApplyPatch[[:space:]]+$$f|^ApplyOptionalPatch[[:space:]]+$$f" $(SPECFILE) || echo "Unapplied: $$f"; fi; done
|
||||
|
||||
ifeq ($(MAKECMDGOALS),me a sandwich)
|
||||
.PHONY: me a sandwich
|
||||
me a:
|
||||
|
|
|
@ -75,7 +75,6 @@ config-release:
|
|||
@perl -pi -e 's/CONFIG_XFS_WARN=y/# CONFIG_XFS_WARN is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_EDAC_DEBUG=y/# CONFIG_EDAC_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_RTLWIFI_DEBUG=y/# CONFIG_RTLWIFI_DEBUG is not set/' config-nodebug
|
||||
@perl -pi -e 's/CONFIG_X86_DEBUG_STATIC_CPU_HAS=y/# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set/' config-nodebug
|
||||
|
||||
@# Undo anything that make extremedebug might have set
|
||||
@perl -pi -e 's/CONFIG_DEBUG_PAGEALLOC=y/# CONFIG_DEBUG_PAGEALLOC is not set/' config-debug
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
From 655fbf360e1481db4f06001f893d388c15ac307f Mon Sep 17 00:00:00 2001
|
||||
From 6f756b32a45b022428e33ce20181e874c73ca82e Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Thu, 8 Mar 2012 10:10:38 -0500
|
||||
Subject: [PATCH 02/20] PCI: Lock down BAR access when module security is
|
||||
enabled
|
||||
Subject: [PATCH] PCI: Lock down BAR access when module security is enabled
|
||||
|
||||
Any hardware that can potentially generate DMA has to be locked down from
|
||||
userspace in order to avoid it being possible for an attacker to modify
|
||||
|
@ -18,7 +17,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
|||
3 files changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
|
||||
index 312f23a8429c..93e6ac103dd0 100644
|
||||
index bcd10c7..a950301 100644
|
||||
--- a/drivers/pci/pci-sysfs.c
|
||||
+++ b/drivers/pci/pci-sysfs.c
|
||||
@@ -30,6 +30,7 @@
|
||||
|
@ -29,7 +28,7 @@ index 312f23a8429c..93e6ac103dd0 100644
|
|||
#include "pci.h"
|
||||
|
||||
static int sysfs_initialized; /* = 0 */
|
||||
@@ -710,6 +711,9 @@ static ssize_t pci_write_config(struct file *filp, struct kobject *kobj,
|
||||
@@ -716,6 +717,9 @@ static ssize_t pci_write_config(struct file *filp, struct kobject *kobj,
|
||||
loff_t init_off = off;
|
||||
u8 *data = (u8 *) buf;
|
||||
|
||||
|
@ -39,7 +38,7 @@ index 312f23a8429c..93e6ac103dd0 100644
|
|||
if (off > dev->cfg_size)
|
||||
return 0;
|
||||
if (off + count > dev->cfg_size) {
|
||||
@@ -1004,6 +1008,9 @@ static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
|
||||
@@ -1007,6 +1011,9 @@ static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
|
||||
resource_size_t start, end;
|
||||
int i;
|
||||
|
||||
|
@ -49,7 +48,7 @@ index 312f23a8429c..93e6ac103dd0 100644
|
|||
for (i = 0; i < PCI_ROM_RESOURCE; i++)
|
||||
if (res == &pdev->resource[i])
|
||||
break;
|
||||
@@ -1105,6 +1112,9 @@ static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj,
|
||||
@@ -1106,6 +1113,9 @@ static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj,
|
||||
struct bin_attribute *attr, char *buf,
|
||||
loff_t off, size_t count)
|
||||
{
|
||||
|
@ -60,7 +59,7 @@ index 312f23a8429c..93e6ac103dd0 100644
|
|||
}
|
||||
|
||||
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
|
||||
index 3f155e78513f..4265ea07e3b0 100644
|
||||
index 2408abe..59f321c 100644
|
||||
--- a/drivers/pci/proc.c
|
||||
+++ b/drivers/pci/proc.c
|
||||
@@ -116,6 +116,9 @@ static ssize_t proc_bus_pci_write(struct file *file, const char __user *buf,
|
||||
|
@ -85,7 +84,7 @@ index 3f155e78513f..4265ea07e3b0 100644
|
|||
ret = pci_domain_nr(dev->bus);
|
||||
@@ -233,7 +239,7 @@ static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
|
||||
struct pci_filp_private *fpriv = file->private_data;
|
||||
int i, ret;
|
||||
int i, ret, write_combine;
|
||||
|
||||
- if (!capable(CAP_SYS_RAWIO))
|
||||
+ if (!capable(CAP_SYS_RAWIO) || secure_modules())
|
||||
|
@ -93,7 +92,7 @@ index 3f155e78513f..4265ea07e3b0 100644
|
|||
|
||||
/* Make sure the caller is mapping a real resource for this device */
|
||||
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c
|
||||
index b91c4da68365..98f5637304d1 100644
|
||||
index b91c4da..98f5637 100644
|
||||
--- a/drivers/pci/syscall.c
|
||||
+++ b/drivers/pci/syscall.c
|
||||
@@ -10,6 +10,7 @@
|
||||
|
@ -114,5 +113,5 @@ index b91c4da68365..98f5637304d1 100644
|
|||
|
||||
dev = pci_get_bus_and_slot(bus, dfn);
|
||||
--
|
||||
2.4.3
|
||||
2.9.2
|
||||
|
||||
|
|
104
PatchList.txt
104
PatchList.txt
|
@ -1,52 +1,78 @@
|
|||
**** Backports and patches headed/already upsteram *****************************
|
||||
# This file contains patches that we intend to carry for longer than
|
||||
# "Should show up in a stable release soonish"
|
||||
# Some of these may eventually drop out
|
||||
|
||||
* cpupower-Fix-segfault-due-to-incorrect-getopt_long-a.patch (rhbz 1000439)
|
||||
- Queued for next upstream release I believe. Fixes a segfault in cpupower
|
||||
kbuild-AFTER_LINK.patch
|
||||
|
||||
* dm-cache-policy-mq_fix-large-scale-table-allocation-bug.patch (rhbz 993744)
|
||||
- Still pending upstream
|
||||
arm64-avoid-needing-console-to-enable-serial-console.patch
|
||||
|
||||
* ath9k_rx_dma_stop_check.patch (rhbz 892811)
|
||||
- Fixes some DMA issue on specific hardware. Taken from
|
||||
https://dev.openwrt.org/browser/trunk/package/mac80211/patches/552-ath9k_rx_dma_stop_check.patch?rev=34910
|
||||
geekbox-v4-device-tree-support.patch
|
||||
|
||||
* secure-modules.patch
|
||||
* modsign-uefi.patch
|
||||
* sb-hibernate.patch
|
||||
* sysrq-secure-boot.patch
|
||||
- Fedora secure boot support.
|
||||
- Dear Matthew, this is your fault. Run sed already and get a new set out.
|
||||
Initial-AllWinner-A64-and-PINE64-support.patch
|
||||
|
||||
**** Other stuff that should go upstream (in decreasing likelyhood) ************
|
||||
arm64-pcie-quirks-xgene.patch
|
||||
|
||||
* defaults-acpi-video.patch
|
||||
* disable-i8042-check-on-apple-mac.patch
|
||||
* no-pcspkr-modalias.patch
|
||||
* die-floppy-die.patch
|
||||
Fedora policy decisions
|
||||
Turn into CONFIG_ options and upstream ?
|
||||
usb-phy-tegra-Add-38.4MHz-clock-table-entry.patch
|
||||
|
||||
* input-kill-stupid-messages.patch
|
||||
* silence-fbcon-logo.patch
|
||||
* silence-noise.patch
|
||||
Fedora local 'hush' patches. (TODO: push more upstream)
|
||||
ARM-tegra-usb-no-reset.patch
|
||||
|
||||
* makefile-after_link.patch
|
||||
Rolandware that is used by the debuginfo generation.
|
||||
Possibly upstreamable ?
|
||||
bcm283x-upstream-fixes.patch
|
||||
|
||||
* serial-460800.patch
|
||||
Probably not upstreamable.
|
||||
http://marc.theaimsgroup.com/?l=linux-kernel&m=112687270832687&w=2
|
||||
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=126403
|
||||
http://lkml.org/lkml/2006/8/2/208
|
||||
lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
|
||||
|
||||
********************************************************************************
|
||||
input-kill-stupid-messages.patch
|
||||
|
||||
'MUSTARD' patches. Fedora local patches that are very unlikely to go upstream.
|
||||
die-floppy-die.patch
|
||||
|
||||
* crash-driver.patch
|
||||
Unlikely to go upstream.
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=492803
|
||||
no-pcspkr-modalias.patch
|
||||
|
||||
silence-fbcon-logo.patch
|
||||
|
||||
Kbuild-Add-an-option-to-enable-GCC-VTA.patch
|
||||
|
||||
crash-driver.patch
|
||||
|
||||
#Secure boot patches
|
||||
Add-secure_modules-call.patch
|
||||
PCI-Lock-down-BAR-access-when-module-security-is-ena.patch
|
||||
x86-Lock-down-IO-port-access-when-module-security-is.patch
|
||||
ACPI-Limit-access-to-custom_method.patch
|
||||
asus-wmi-Restrict-debugfs-interface-when-module-load.patch
|
||||
Restrict-dev-mem-and-dev-kmem-when-module-loading-is.patch
|
||||
acpi-Ignore-acpi_rsdp-kernel-parameter-when-module-l.patch
|
||||
kexec-Disable-at-runtime-if-the-kernel-enforces-modu.patch
|
||||
x86-Restrict-MSR-access-when-module-loading-is-restr.patch
|
||||
Add-option-to-automatically-enforce-module-signature.patch
|
||||
efi-Disable-secure-boot-if-shim-is-in-insecure-mode.patch
|
||||
efi-Add-EFI_SECURE_BOOT-bit.patch
|
||||
hibernate-Disable-in-a-signed-modules-environment.patch
|
||||
Add-EFI-signature-data-types.patch
|
||||
Add-an-EFI-signature-blob-parser-and-key-loader.patch
|
||||
KEYS-Add-a-system-blacklist-keyring.patch
|
||||
MODSIGN-Import-certificates-from-UEFI-Secure-Boot.patch
|
||||
MODSIGN-Support-not-importing-certs-from-db.patch
|
||||
Add-sysrq-option-to-disable-secure-boot-mode.patch
|
||||
kexec-uefi-copy-secure_boot-flag-in-boot-params.patch
|
||||
|
||||
drm-i915-hush-check-crtc-state.patch
|
||||
|
||||
disable-i8042-check-on-apple-mac.patch
|
||||
|
||||
lis3-improve-handling-of-null-rate.patch
|
||||
|
||||
watchdog-Disable-watchdog-on-virtual-machines.patch
|
||||
|
||||
scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
|
||||
|
||||
criu-no-expert.patch
|
||||
|
||||
ath9k-rx-dma-stop-check.patch
|
||||
|
||||
xen-pciback-Don-t-disable-PCI_COMMAND-on-PCI-device-.patch
|
||||
|
||||
Input-synaptics-pin-3-touches-when-the-firmware-repo.patch
|
||||
|
||||
firmware-Drop-WARN-from-usermodehelper_read_trylock-.patch
|
||||
|
||||
drm-i915-turn-off-wc-mmaps.patch
|
||||
|
||||
********************************************************************************
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
From: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Date: 2016-09-15 13:44:56
|
||||
Subject: [patch v2] arcmsr: buffer overflow in arcmsr_iop_message_xfer()
|
||||
|
||||
We need to put an upper bound on "user_len" so the memcpy() doesn't
|
||||
overflow.
|
||||
|
||||
Reported-by: Marco Grassi <marco.gra@gmail.com>
|
||||
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
|
||||
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
|
||||
|
||||
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
|
||||
index 7640498..110eca9 100644
|
||||
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
|
||||
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
|
||||
@@ -2388,7 +2388,8 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb,
|
||||
}
|
||||
case ARCMSR_MESSAGE_WRITE_WQBUFFER: {
|
||||
unsigned char *ver_addr;
|
||||
- int32_t user_len, cnt2end;
|
||||
+ uint32_t user_len;
|
||||
+ int32_t cnt2end;
|
||||
uint8_t *pQbuffer, *ptmpuserbuffer;
|
||||
ver_addr = kmalloc(ARCMSR_API_DATA_BUFLEN, GFP_ATOMIC);
|
||||
if (!ver_addr) {
|
||||
@@ -2397,6 +2398,11 @@ static int arcmsr_iop_message_xfer(struct AdapterControlBlock *acb,
|
||||
}
|
||||
ptmpuserbuffer = ver_addr;
|
||||
user_len = pcmdmessagefld->cmdmessage.Length;
|
||||
+ if (user_len > ARCMSR_API_DATA_BUFLEN) {
|
||||
+ retvalue = ARCMSR_MESSAGE_FAIL;
|
||||
+ kfree(ver_addr);
|
||||
+ goto message_out;
|
||||
+ }
|
||||
memcpy(ptmpuserbuffer,
|
||||
pcmdmessagefld->messagedatabuffer, user_len);
|
||||
spin_lock_irqsave(&acb->wqbuffer_lock, flags);
|
||||
--
|
||||
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
|
||||
the body of a message to majordomo@vger.kernel.org
|
||||
More majordomo info at http://vger.kernel.org/majordomo-info.html
|
|
@ -1,354 +0,0 @@
|
|||
From: Christopher Spinrath <christopher.spinrath@xxxxxxxxxxxxxx>
|
||||
|
||||
The CompuLab Utilite Pro is a miniature fanless desktop pc based on
|
||||
the i.MX6 Quad powered cm-fx6 module. It features two serial ports,
|
||||
USB OTG, 4x USB, analog audio and S/PDIF, 2x Gb Ethernet, HDMI and
|
||||
DVI ports, an on-board 32GB SSD, a mmc slot, and on-board wifi/bt.
|
||||
|
||||
Add initial support for it including USB, Ethernet (both ports), sata
|
||||
and HDMI support.
|
||||
|
||||
Signed-off-by: Christopher Spinrath <christopher.spinrath@xxxxxxxxxxxxxx>
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/imx6q-utilite-pro.dts | 128 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 129 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/imx6q-utilite-pro.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 515a428..287044c 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -369,6 +369,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
|
||||
imx6q-tx6q-1110.dtb \
|
||||
imx6q-tx6q-11x0-mb7.dtb \
|
||||
imx6q-udoo.dtb \
|
||||
+ imx6q-utilite-pro.dtb \
|
||||
imx6q-wandboard.dtb \
|
||||
imx6q-wandboard-revb1.dtb \
|
||||
imx6qp-nitrogen6_max.dtb \
|
||||
diff --git a/arch/arm/boot/dts/imx6q-utilite-pro.dts b/arch/arm/boot/dts/imx6q-utilite-pro.dts
|
||||
new file mode 100644
|
||||
index 0000000..bcd8e0d
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/imx6q-utilite-pro.dts
|
||||
@@ -0,0 +1,128 @@
|
||||
+/*
|
||||
+ * Copyright 2016 Christopher Spinrath
|
||||
+ * Copyright 2013 CompuLab Ltd.
|
||||
+ *
|
||||
+ * Based on the GPLv2 licensed devicetree distributed with the vendor
|
||||
+ * kernel for the Utilite Pro:
|
||||
+ * Copyright 2013 CompuLab Ltd.
|
||||
+ * Author: Valentin Raevsky <valentin@xxxxxxxxxxxxxx>
|
||||
+ *
|
||||
+ * The code contained herein is licensed under the GNU General Public
|
||||
+ * License. You may obtain a copy of the GNU General Public License
|
||||
+ * Version 2 or later at the following locations:
|
||||
+ *
|
||||
+ * http://www.opensource.org/licenses/gpl-license.html
|
||||
+ * http://www.gnu.org/copyleft/gpl.html
|
||||
+ */
|
||||
+
|
||||
+#include "imx6q-cm-fx6.dts"
|
||||
+
|
||||
+/ {
|
||||
+ model = "CompuLab Utilite Pro";
|
||||
+ compatible = "compulab,utilite-pro", "compulab,cm-fx6", "fsl,imx6q";
|
||||
+
|
||||
+ aliases {
|
||||
+ ethernet1 = ð1;
|
||||
+ rtc0 = &em3027;
|
||||
+ rtc1 = &snvs_rtc;
|
||||
+ };
|
||||
+
|
||||
+ gpio-keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+ power {
|
||||
+ label = "Power Button";
|
||||
+ gpios = <&gpio1 29 1>;
|
||||
+ linux,code = <116>; /* KEY_POWER */
|
||||
+ gpio-key,wakeup;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi {
|
||||
+ ddc-i2c-bus = <&i2c2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2c1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_i2c1>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ eeprom@50 {
|
||||
+ compatible = "at24,24c02";
|
||||
+ reg = <0x50>;
|
||||
+ pagesize = <16>;
|
||||
+ };
|
||||
+
|
||||
+ em3027: rtc@56 {
|
||||
+ compatible = "emmicro,em3027";
|
||||
+ reg = <0x56>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&i2c2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_i2c2>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&iomuxc {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_hog>;
|
||||
+
|
||||
+ hog {
|
||||
+ pinctrl_hog: hoggrp {
|
||||
+ fsl,pins = <
|
||||
+ /* power button */
|
||||
+ MX6QDL_PAD_ENET_TXD1__GPIO1_IO29 0x80000000
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ imx6q-utilite-pro {
|
||||
+ pinctrl_i2c1: i2c1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D21__I2C1_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_EIM_D28__I2C1_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_i2c2: i2c2grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_KEY_ROW3__I2C2_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_uart2: uart2grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_GPIO_7__UART2_TX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_GPIO_8__UART2_RX_DATA 0x1b0b1
|
||||
+ MX6QDL_PAD_SD4_DAT5__UART2_RTS_B 0x1b0b1
|
||||
+ MX6QDL_PAD_SD4_DAT6__UART2_CTS_B 0x1b0b1
|
||||
+ >;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&pcie {
|
||||
+ pcie@0,0 {
|
||||
+ reg = <0x000000 0 0 0 0>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+
|
||||
+ /* non-removable i211 ethernet card */
|
||||
+ eth1: intel,i211@pcie0,0 {
|
||||
+ reg = <0x010000 0 0 0 0>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart2 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_uart2>;
|
||||
+ fsl,uart-has-rtscts;
|
||||
+ dma-names = "rx", "tx";
|
||||
+ dmas = <&sdma 27 4 0>, <&sdma 28 4 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.8.2
|
||||
From: Christopher Spinrath <christopher.spinrath@xxxxxxxxxxxxxx>
|
||||
|
||||
The cm-fx6 module has an on-board spi-flash chip for its firmware, an
|
||||
eeprom (containing e.g. the mac address of the on-board Ethernet),
|
||||
a sata port, a pcie controller, an USB hub, and an USB otg port.
|
||||
Enable support for them. In addition, enable syscon poweroff support.
|
||||
|
||||
Signed-off-by: Christopher Spinrath <christopher.spinrath@xxxxxxxxxxxxxx>
|
||||
---
|
||||
arch/arm/boot/dts/imx6q-cm-fx6.dts | 136 +++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 136 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts
|
||||
index 99b46f8..f4fc22e 100644
|
||||
--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts
|
||||
+++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts
|
||||
@@ -31,6 +31,61 @@
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
+
|
||||
+ regulators {
|
||||
+ compatible = "simple-bus";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ reg_usb_otg_vbus: usb_otg_vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb_otg_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio3 22 0>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
+ reg_usb_h1_vbus: usb_h1_vbus {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb_h1_vbus";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio7 8 0>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&ecspi1 {
|
||||
+ fsl,spi-num-chipselects = <2>;
|
||||
+ cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_ecspi1>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ flash: m25p80@0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ compatible = "st,m25p", "jedec,spi-nor";
|
||||
+ spi-max-frequency = <20000000>;
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "uboot";
|
||||
+ reg = <0x0 0xc0000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@c0000 {
|
||||
+ label = "uboot environment";
|
||||
+ reg = <0xc0000 0x40000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "reserved";
|
||||
+ reg = <0x100000 0x100000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&fec {
|
||||
@@ -46,8 +101,31 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&i2c3 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_i2c3>;
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <100000>;
|
||||
+
|
||||
+ eeprom@50 {
|
||||
+ compatible = "at24,24c02";
|
||||
+ reg = <0x50>;
|
||||
+ pagesize = <16>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&iomuxc {
|
||||
imx6q-cm-fx6 {
|
||||
+ pinctrl_ecspi1: ecspi1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1
|
||||
+ MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1
|
||||
+ MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1
|
||||
+ MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x100b1
|
||||
+ MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x100b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_enet: enetgrp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
|
||||
@@ -91,17 +169,75 @@
|
||||
>;
|
||||
};
|
||||
|
||||
+ pinctrl_i2c3: i2c3grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
|
||||
+ MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_pcie: pciegrp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_ENET_RXD1__GPIO1_IO26 0x80000000
|
||||
+ MX6QDL_PAD_EIM_CS1__GPIO2_IO24 0x80000000
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
pinctrl_uart4: uart4grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_KEY_COL0__UART4_TX_DATA 0x1b0b1
|
||||
MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1
|
||||
>;
|
||||
};
|
||||
+
|
||||
+ pinctrl_usbh1: usbh1grp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x80000000
|
||||
+ >;
|
||||
+ };
|
||||
+
|
||||
+ pinctrl_usbotg: usbotggrp {
|
||||
+ fsl,pins = <
|
||||
+ MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x17059
|
||||
+ MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x80000000
|
||||
+ >;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
+&pcie {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_pcie>;
|
||||
+ reset-gpio = <&gpio1 26 0>;
|
||||
+ power-on-gpio = <&gpio2 24 0>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sata {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&snvs_poweroff {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&uart4 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_uart4>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&usbotg {
|
||||
+ vbus-supply = <®_usb_otg_vbus>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_usbotg>;
|
||||
+ dr_mode = "otg";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbh1 {
|
||||
+ vbus-supply = <®_usb_h1_vbus>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pinctrl_usbh1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.8.2
|
||||
|
|
@ -0,0 +1,596 @@
|
|||
From patchwork Fri Aug 12 11:07:14 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v9,1/4] of/serial: move earlycon early_param handling to serial
|
||||
From: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
X-Patchwork-Id: 9276727
|
||||
Message-Id: <20160812110717.12351-1-aleksey.makarov@linaro.org>
|
||||
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
Aleksey Makarov <aleksey.makarov@linaro.org>,
|
||||
Russell King <linux@arm.linux.org.uk>, Len Brown <lenb@kernel.org>,
|
||||
Leif Lindholm <leif.lindholm@linaro.org>,
|
||||
Graeme Gregory <graeme.gregory@linaro.org>, Al Stone <ahs3@redhat.com>,
|
||||
Christopher Covington <cov@codeaurora.org>,
|
||||
Yury Norov <ynorov@caviumnetworks.com>,
|
||||
Peter Hurley <peter@hurleysoftware.com>,
|
||||
Andy Shevchenko <andy.shevchenko@gmail.com>,
|
||||
"Zheng, Lv" <lv.zheng@intel.com>, Mark Salter <msalter@redhat.com>,
|
||||
Kefeng Wang <wangkefeng.wang@huawei.com>,
|
||||
Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>,
|
||||
Jiri Slaby <jslaby@suse.com>, devicetree@vger.kernel.org
|
||||
Date: Fri, 12 Aug 2016 14:07:14 +0300
|
||||
|
||||
From: Leif Lindholm <leif.lindholm@linaro.org>
|
||||
|
||||
We have multiple "earlycon" early_param handlers - merge the DT one into
|
||||
the main earlycon one. It's a cleanup that also will be useful
|
||||
to defer setting up DT console until ACPI/DT decision is made.
|
||||
|
||||
Rename the exported function to avoid clashing with the function from
|
||||
arch/microblaze/kernel/prom.c
|
||||
|
||||
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
|
||||
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
|
||||
---
|
||||
drivers/of/fdt.c | 11 +----------
|
||||
drivers/tty/serial/earlycon.c | 2 +-
|
||||
include/linux/of_fdt.h | 3 +++
|
||||
3 files changed, 5 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
|
||||
index 55f1b83..741cac53 100644
|
||||
--- a/drivers/of/fdt.c
|
||||
+++ b/drivers/of/fdt.c
|
||||
@@ -924,7 +924,7 @@ static inline void early_init_dt_check_for_initrd(unsigned long node)
|
||||
|
||||
#ifdef CONFIG_SERIAL_EARLYCON
|
||||
|
||||
-static int __init early_init_dt_scan_chosen_serial(void)
|
||||
+int __init early_init_dt_scan_chosen_stdout(void)
|
||||
{
|
||||
int offset;
|
||||
const char *p, *q, *options = NULL;
|
||||
@@ -968,15 +968,6 @@ static int __init early_init_dt_scan_chosen_serial(void)
|
||||
}
|
||||
return -ENODEV;
|
||||
}
|
||||
-
|
||||
-static int __init setup_of_earlycon(char *buf)
|
||||
-{
|
||||
- if (buf)
|
||||
- return 0;
|
||||
-
|
||||
- return early_init_dt_scan_chosen_serial();
|
||||
-}
|
||||
-early_param("earlycon", setup_of_earlycon);
|
||||
#endif
|
||||
|
||||
/**
|
||||
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
|
||||
index 067783f..7aae655 100644
|
||||
--- a/drivers/tty/serial/earlycon.c
|
||||
+++ b/drivers/tty/serial/earlycon.c
|
||||
@@ -209,7 +209,7 @@ static int __init param_setup_earlycon(char *buf)
|
||||
* don't generate a warning from parse_early_params() in that case
|
||||
*/
|
||||
if (!buf || !buf[0])
|
||||
- return 0;
|
||||
+ return early_init_dt_scan_chosen_stdout();
|
||||
|
||||
err = setup_earlycon(buf);
|
||||
if (err == -ENOENT || err == -EALREADY)
|
||||
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
|
||||
index 26c3302..4341f32 100644
|
||||
--- a/include/linux/of_fdt.h
|
||||
+++ b/include/linux/of_fdt.h
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
+#include <linux/errno.h>
|
||||
|
||||
/* Definitions used by the flattened device tree */
|
||||
#define OF_DT_HEADER 0xd00dfeed /* marker */
|
||||
@@ -66,6 +67,7 @@ extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
|
||||
int depth, void *data);
|
||||
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
|
||||
int depth, void *data);
|
||||
+extern int early_init_dt_scan_chosen_stdout(void);
|
||||
extern void early_init_fdt_scan_reserved_mem(void);
|
||||
extern void early_init_fdt_reserve_self(void);
|
||||
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
|
||||
@@ -94,6 +96,7 @@ extern void early_get_first_memblock_info(void *, phys_addr_t *);
|
||||
extern u64 of_flat_dt_translate_address(unsigned long node);
|
||||
extern void of_fdt_limit_memory(int limit);
|
||||
#else /* CONFIG_OF_FLATTREE */
|
||||
+static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; }
|
||||
static inline void early_init_fdt_scan_reserved_mem(void) {}
|
||||
static inline void early_init_fdt_reserve_self(void) {}
|
||||
static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
|
||||
From patchwork Thu Aug 11 15:31:39 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v9,2/4] ACPI: parse SPCR and enable matching console
|
||||
From: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
X-Patchwork-Id: 9275443
|
||||
Message-Id: <20160811153152.755-3-aleksey.makarov@linaro.org>
|
||||
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
Aleksey Makarov <aleksey.makarov@linaro.org>,
|
||||
Russell King <linux@arm.linux.org.uk>, Len Brown <lenb@kernel.org>,
|
||||
Leif Lindholm <leif.lindholm@linaro.org>,
|
||||
Graeme Gregory <graeme.gregory@linaro.org>, Al Stone <ahs3@redhat.com>,
|
||||
Christopher Covington <cov@codeaurora.org>,
|
||||
Yury Norov <ynorov@caviumnetworks.com>,
|
||||
Peter Hurley <peter@hurleysoftware.com>,
|
||||
Andy Shevchenko <andy.shevchenko@gmail.com>,
|
||||
"Zheng, Lv" <lv.zheng@intel.com>, Mark Salter <msalter@redhat.com>,
|
||||
Kefeng Wang <wangkefeng.wang@huawei.com>, Jiri Slaby <jslaby@suse.com>
|
||||
Date: Thu, 11 Aug 2016 18:31:39 +0300
|
||||
|
||||
'ARM Server Base Boot Requiremets' [1] mentions SPCR (Serial Port
|
||||
Console Redirection Table) [2] as a mandatory ACPI table that
|
||||
specifies the configuration of serial console.
|
||||
|
||||
Defer initialization of DT earlycon until ACPI/DT decision is made.
|
||||
|
||||
Parse the ACPI SPCR table, setup earlycon if required,
|
||||
enable specified console.
|
||||
|
||||
Thanks to Peter Hurley for explaining how this should work.
|
||||
|
||||
[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html
|
||||
[2] https://msdn.microsoft.com/en-us/library/windows/hardware/dn639132(v=vs.85).aspx
|
||||
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
|
||||
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
|
||||
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
|
||||
---
|
||||
drivers/acpi/Kconfig | 3 ++
|
||||
drivers/acpi/Makefile | 1 +
|
||||
drivers/acpi/spcr.c | 111 ++++++++++++++++++++++++++++++++++++++++++
|
||||
drivers/tty/serial/earlycon.c | 19 +++++++-
|
||||
include/linux/acpi.h | 6 +++
|
||||
include/linux/serial_core.h | 9 +++-
|
||||
6 files changed, 146 insertions(+), 3 deletions(-)
|
||||
create mode 100644 drivers/acpi/spcr.c
|
||||
|
||||
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
|
||||
index 6cef2d1..4a269f9 100644
|
||||
--- a/drivers/acpi/Kconfig
|
||||
+++ b/drivers/acpi/Kconfig
|
||||
@@ -77,6 +77,9 @@ config ACPI_DEBUGGER_USER
|
||||
|
||||
endif
|
||||
|
||||
+config ACPI_SPCR_TABLE
|
||||
+ bool
|
||||
+
|
||||
config ACPI_SLEEP
|
||||
bool
|
||||
depends on SUSPEND || HIBERNATION
|
||||
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
|
||||
index e5ada78..d799593 100644
|
||||
--- a/drivers/acpi/Makefile
|
||||
+++ b/drivers/acpi/Makefile
|
||||
@@ -81,6 +81,7 @@ obj-$(CONFIG_ACPI_EC_DEBUGFS) += ec_sys.o
|
||||
obj-$(CONFIG_ACPI_CUSTOM_METHOD)+= custom_method.o
|
||||
obj-$(CONFIG_ACPI_BGRT) += bgrt.o
|
||||
obj-$(CONFIG_ACPI_CPPC_LIB) += cppc_acpi.o
|
||||
+obj-$(CONFIG_ACPI_SPCR_TABLE) += spcr.o
|
||||
obj-$(CONFIG_ACPI_DEBUGGER_USER) += acpi_dbg.o
|
||||
|
||||
# processor has its own "processor." module_param namespace
|
||||
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
|
||||
new file mode 100644
|
||||
index 0000000..e8d7bc7
|
||||
--- /dev/null
|
||||
+++ b/drivers/acpi/spcr.c
|
||||
@@ -0,0 +1,111 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2012, Intel Corporation
|
||||
+ * Copyright (c) 2015, Red Hat, Inc.
|
||||
+ * Copyright (c) 2015, 2016 Linaro Ltd.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#define pr_fmt(fmt) "ACPI: SPCR: " fmt
|
||||
+
|
||||
+#include <linux/acpi.h>
|
||||
+#include <linux/console.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/serial_core.h>
|
||||
+
|
||||
+/**
|
||||
+ * parse_spcr() - parse ACPI SPCR table and add preferred console
|
||||
+ *
|
||||
+ * @earlycon: set up earlycon for the console specified by the table
|
||||
+ *
|
||||
+ * For the architectures with support for ACPI, CONFIG_ACPI_SPCR_TABLE may be
|
||||
+ * defined to parse ACPI SPCR table. As a result of the parsing preferred
|
||||
+ * console is registered and if @earlycon is true, earlycon is set up.
|
||||
+ *
|
||||
+ * When CONFIG_ACPI_SPCR_TABLE is defined, this function should be called
|
||||
+ * from arch inintialization code as soon as the DT/ACPI decision is made.
|
||||
+ *
|
||||
+ */
|
||||
+int __init parse_spcr(bool earlycon)
|
||||
+{
|
||||
+ static char opts[64];
|
||||
+ struct acpi_table_spcr *table;
|
||||
+ acpi_size table_size;
|
||||
+ acpi_status status;
|
||||
+ char *uart;
|
||||
+ char *iotype;
|
||||
+ int baud_rate;
|
||||
+ int err;
|
||||
+
|
||||
+ if (acpi_disabled)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ status = acpi_get_table_with_size(ACPI_SIG_SPCR, 0,
|
||||
+ (struct acpi_table_header **)&table,
|
||||
+ &table_size);
|
||||
+
|
||||
+ if (ACPI_FAILURE(status))
|
||||
+ return -ENOENT;
|
||||
+
|
||||
+ if (table->header.revision < 2) {
|
||||
+ err = -ENOENT;
|
||||
+ pr_err("wrong table version\n");
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ iotype = table->serial_port.space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY ?
|
||||
+ "mmio" : "io";
|
||||
+
|
||||
+ switch (table->interface_type) {
|
||||
+ case ACPI_DBG2_ARM_SBSA_32BIT:
|
||||
+ iotype = "mmio32";
|
||||
+ /* fall through */
|
||||
+ case ACPI_DBG2_ARM_PL011:
|
||||
+ case ACPI_DBG2_ARM_SBSA_GENERIC:
|
||||
+ case ACPI_DBG2_BCM2835:
|
||||
+ uart = "pl011";
|
||||
+ break;
|
||||
+ case ACPI_DBG2_16550_COMPATIBLE:
|
||||
+ case ACPI_DBG2_16550_SUBSET:
|
||||
+ uart = "uart";
|
||||
+ break;
|
||||
+ default:
|
||||
+ err = -ENOENT;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ switch (table->baud_rate) {
|
||||
+ case 3:
|
||||
+ baud_rate = 9600;
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ baud_rate = 19200;
|
||||
+ break;
|
||||
+ case 6:
|
||||
+ baud_rate = 57600;
|
||||
+ break;
|
||||
+ case 7:
|
||||
+ baud_rate = 115200;
|
||||
+ break;
|
||||
+ default:
|
||||
+ err = -ENOENT;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ snprintf(opts, sizeof(opts), "%s,%s,0x%llx,%d", uart, iotype,
|
||||
+ table->serial_port.address, baud_rate);
|
||||
+
|
||||
+ pr_info("console: %s\n", opts);
|
||||
+
|
||||
+ if (earlycon)
|
||||
+ setup_earlycon(opts);
|
||||
+
|
||||
+ err = add_preferred_console(uart, 0, opts + strlen(uart) + 1);
|
||||
+
|
||||
+done:
|
||||
+ early_acpi_os_unmap_memory((void __iomem *)table, table_size);
|
||||
+ return err;
|
||||
+}
|
||||
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
|
||||
index 7aae655..ea00b9f 100644
|
||||
--- a/drivers/tty/serial/earlycon.c
|
||||
+++ b/drivers/tty/serial/earlycon.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/sizes.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_fdt.h>
|
||||
+#include <linux/acpi.h>
|
||||
|
||||
#ifdef CONFIG_FIX_EARLYCON_MEM
|
||||
#include <asm/fixmap.h>
|
||||
@@ -199,6 +200,14 @@ int __init setup_earlycon(char *buf)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * When CONFIG_ACPI_SPCR_TABLE is defined, "earlycon" without parameters in
|
||||
+ * command line does not start DT earlycon immediately, instead it defers
|
||||
+ * starting it until DT/ACPI decision is made. At that time if ACPI is enabled
|
||||
+ * call parse_spcr(), else call early_init_dt_scan_chosen_stdout()
|
||||
+ */
|
||||
+bool earlycon_init_is_deferred __initdata;
|
||||
+
|
||||
/* early_param wrapper for setup_earlycon() */
|
||||
static int __init param_setup_earlycon(char *buf)
|
||||
{
|
||||
@@ -208,8 +217,14 @@ static int __init param_setup_earlycon(char *buf)
|
||||
* Just 'earlycon' is a valid param for devicetree earlycons;
|
||||
* don't generate a warning from parse_early_params() in that case
|
||||
*/
|
||||
- if (!buf || !buf[0])
|
||||
- return early_init_dt_scan_chosen_stdout();
|
||||
+ if (!buf || !buf[0]) {
|
||||
+ if (IS_ENABLED(CONFIG_ACPI_SPCR_TABLE)) {
|
||||
+ earlycon_init_is_deferred = true;
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ return early_init_dt_scan_chosen_stdout();
|
||||
+ }
|
||||
+ }
|
||||
|
||||
err = setup_earlycon(buf);
|
||||
if (err == -ENOENT || err == -EALREADY)
|
||||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
|
||||
index 4d8452c..32407e4 100644
|
||||
--- a/include/linux/acpi.h
|
||||
+++ b/include/linux/acpi.h
|
||||
@@ -1074,4 +1074,10 @@ void acpi_table_upgrade(void);
|
||||
static inline void acpi_table_upgrade(void) { }
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_ACPI_SPCR_TABLE
|
||||
+int parse_spcr(bool earlycon);
|
||||
+#else
|
||||
+static inline int parse_spcr(bool earlycon) { return 0; }
|
||||
+#endif
|
||||
+
|
||||
#endif /*_LINUX_ACPI_H*/
|
||||
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
|
||||
index 2f44e20..04b8cfb 100644
|
||||
--- a/include/linux/serial_core.h
|
||||
+++ b/include/linux/serial_core.h
|
||||
@@ -367,11 +367,18 @@ extern const struct earlycon_id __earlycon_table_end[];
|
||||
|
||||
#define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn)
|
||||
|
||||
-extern int setup_earlycon(char *buf);
|
||||
extern int of_setup_earlycon(const struct earlycon_id *match,
|
||||
unsigned long node,
|
||||
const char *options);
|
||||
|
||||
+#ifdef CONFIG_SERIAL_EARLYCON
|
||||
+extern bool earlycon_init_is_deferred __initdata;
|
||||
+extern int setup_earlycon(char *buf);
|
||||
+#else
|
||||
+static const bool earlycon_init_is_deferred;
|
||||
+static inline int setup_earlycon(char *buf) { return 0; }
|
||||
+#endif
|
||||
+
|
||||
struct uart_port *uart_get_console(struct uart_port *ports, int nr,
|
||||
struct console *c);
|
||||
int uart_parse_earlycon(char *p, unsigned char *iotype, unsigned long *addr,
|
||||
From patchwork Thu Aug 11 15:31:40 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v9,3/4] ARM64: ACPI: enable ACPI_SPCR_TABLE
|
||||
From: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
X-Patchwork-Id: 9275457
|
||||
Message-Id: <20160811153152.755-4-aleksey.makarov@linaro.org>
|
||||
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
Aleksey Makarov <aleksey.makarov@linaro.org>,
|
||||
Russell King <linux@arm.linux.org.uk>, Len Brown <lenb@kernel.org>,
|
||||
Leif Lindholm <leif.lindholm@linaro.org>,
|
||||
Graeme Gregory <graeme.gregory@linaro.org>, Al Stone <ahs3@redhat.com>,
|
||||
Christopher Covington <cov@codeaurora.org>,
|
||||
Yury Norov <ynorov@caviumnetworks.com>,
|
||||
Peter Hurley <peter@hurleysoftware.com>,
|
||||
Andy Shevchenko <andy.shevchenko@gmail.com>,
|
||||
"Zheng, Lv" <lv.zheng@intel.com>, Mark Salter <msalter@redhat.com>,
|
||||
Kefeng Wang <wangkefeng.wang@huawei.com>,
|
||||
Catalin Marinas <catalin.marinas@arm.com>,
|
||||
Will Deacon <will.deacon@arm.com>
|
||||
Date: Thu, 11 Aug 2016 18:31:40 +0300
|
||||
|
||||
SBBR mentions SPCR as a mandatory ACPI table. So enable it for ARM64
|
||||
|
||||
Earlycon should be set up as early as possible. ACPI boot tables are
|
||||
mapped in arch/arm64/kernel/acpi.c:acpi_boot_table_init() that
|
||||
is called from setup_arch() and that's where we parse SPCR.
|
||||
So it has to be opted-in per-arch.
|
||||
|
||||
When ACPI_SPCR_TABLE is defined initialization of DT earlycon is
|
||||
deferred until the DT/ACPI decision is done. Initialize DT earlycon
|
||||
if ACPI is disabled.
|
||||
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
Tested-by: Kefeng Wang <wangkefeng.wang@huawei.com>
|
||||
---
|
||||
arch/arm64/Kconfig | 1 +
|
||||
arch/arm64/kernel/acpi.c | 11 ++++++++++-
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
|
||||
index 69c8787..a54dfc0 100644
|
||||
--- a/arch/arm64/Kconfig
|
||||
+++ b/arch/arm64/Kconfig
|
||||
@@ -4,6 +4,7 @@ config ARM64
|
||||
select ACPI_GENERIC_GSI if ACPI
|
||||
select ACPI_REDUCED_HARDWARE_ONLY if ACPI
|
||||
select ACPI_MCFG if ACPI
|
||||
+ select ACPI_SPCR_TABLE if ACPI
|
||||
select ARCH_HAS_DEVMEM_IS_ALLOWED
|
||||
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
|
||||
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
|
||||
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
|
||||
index 3e4f1a4..252a6d9 100644
|
||||
--- a/arch/arm64/kernel/acpi.c
|
||||
+++ b/arch/arm64/kernel/acpi.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/of_fdt.h>
|
||||
#include <linux/smp.h>
|
||||
+#include <linux/serial_core.h>
|
||||
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/cpu_ops.h>
|
||||
@@ -206,7 +207,7 @@ void __init acpi_boot_table_init(void)
|
||||
if (param_acpi_off ||
|
||||
(!param_acpi_on && !param_acpi_force &&
|
||||
of_scan_flat_dt(dt_scan_depth1_nodes, NULL)))
|
||||
- return;
|
||||
+ goto done;
|
||||
|
||||
/*
|
||||
* ACPI is disabled at this point. Enable it in order to parse
|
||||
@@ -226,6 +227,14 @@ void __init acpi_boot_table_init(void)
|
||||
if (!param_acpi_force)
|
||||
disable_acpi();
|
||||
}
|
||||
+
|
||||
+done:
|
||||
+ if (acpi_disabled) {
|
||||
+ if (earlycon_init_is_deferred)
|
||||
+ early_init_dt_scan_chosen_stdout();
|
||||
+ } else {
|
||||
+ parse_spcr(earlycon_init_is_deferred);
|
||||
+ }
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ACPI_APEI
|
||||
From patchwork Mon Aug 15 13:35:03 2016
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v9,4/4] serial: pl011: add console matching function
|
||||
From: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
X-Patchwork-Id: 9280971
|
||||
Message-Id: <20160815133505.15294-1-aleksey.makarov@linaro.org>
|
||||
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Cc: linux-serial@vger.kernel.org, linux-acpi@vger.kernel.org,
|
||||
linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
|
||||
Aleksey Makarov <aleksey.makarov@linaro.org>,
|
||||
Russell King <linux@arm.linux.org.uk>, Len Brown <lenb@kernel.org>,
|
||||
Leif Lindholm <leif.lindholm@linaro.org>,
|
||||
Graeme Gregory <graeme.gregory@linaro.org>, Al Stone <ahs3@redhat.com>,
|
||||
Christopher Covington <cov@codeaurora.org>,
|
||||
Yury Norov <ynorov@caviumnetworks.com>,
|
||||
Peter Hurley <peter@hurleysoftware.com>,
|
||||
Andy Shevchenko <andy.shevchenko@gmail.com>,
|
||||
"Zheng, Lv" <lv.zheng@intel.com>, Mark Salter <msalter@redhat.com>,
|
||||
Kefeng Wang <wangkefeng.wang@huawei.com>,
|
||||
Russell King <linux@armlinux.org.uk>, Jiri Slaby <jslaby@suse.com>
|
||||
Date: Mon, 15 Aug 2016 16:35:03 +0300
|
||||
|
||||
This patch adds function pl011_console_match() that implements
|
||||
method match of struct console. It allows to match consoles against
|
||||
data specified in a string, for example taken from command line or
|
||||
compiled by ACPI SPCR table handler.
|
||||
|
||||
Signed-off-by: Aleksey Makarov <aleksey.makarov@linaro.org>
|
||||
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
|
||||
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
drivers/tty/serial/amba-pl011.c | 55 +++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 55 insertions(+)
|
||||
|
||||
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
|
||||
index 8a9e213..2f9af8a 100644
|
||||
--- a/drivers/tty/serial/amba-pl011.c
|
||||
+++ b/drivers/tty/serial/amba-pl011.c
|
||||
@@ -2288,12 +2288,67 @@ static int __init pl011_console_setup(struct console *co, char *options)
|
||||
return uart_set_options(&uap->port, co, baud, parity, bits, flow);
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * pl011_console_match - non-standard console matching
|
||||
+ * @co: registering console
|
||||
+ * @name: name from console command line
|
||||
+ * @idx: index from console command line
|
||||
+ * @options: ptr to option string from console command line
|
||||
+ *
|
||||
+ * Only attempts to match console command lines of the form:
|
||||
+ * console=pl011,mmio|mmio32,<addr>[,<options>]
|
||||
+ * console=pl011,0x<addr>[,<options>]
|
||||
+ * This form is used to register an initial earlycon boot console and
|
||||
+ * replace it with the amba_console at pl011 driver init.
|
||||
+ *
|
||||
+ * Performs console setup for a match (as required by interface)
|
||||
+ * If no <options> are specified, then assume the h/w is already setup.
|
||||
+ *
|
||||
+ * Returns 0 if console matches; otherwise non-zero to use default matching
|
||||
+ */
|
||||
+static int __init pl011_console_match(struct console *co, char *name, int idx,
|
||||
+ char *options)
|
||||
+{
|
||||
+ unsigned char iotype;
|
||||
+ unsigned long addr;
|
||||
+ int i;
|
||||
+
|
||||
+ if (strcmp(name, "pl011") != 0)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (uart_parse_earlycon(options, &iotype, &addr, &options))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (iotype != UPIO_MEM && iotype != UPIO_MEM32)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ /* try to match the port specified on the command line */
|
||||
+ for (i = 0; i < ARRAY_SIZE(amba_ports); i++) {
|
||||
+ struct uart_port *port;
|
||||
+
|
||||
+ if (!amba_ports[i])
|
||||
+ continue;
|
||||
+
|
||||
+ port = &amba_ports[i]->port;
|
||||
+
|
||||
+ if (port->mapbase != addr)
|
||||
+ continue;
|
||||
+
|
||||
+ co->index = i;
|
||||
+ port->cons = co;
|
||||
+ return pl011_console_setup(co, options);
|
||||
+ }
|
||||
+
|
||||
+ return -ENODEV;
|
||||
+}
|
||||
+
|
||||
static struct uart_driver amba_reg;
|
||||
static struct console amba_console = {
|
||||
.name = "ttyAMA",
|
||||
.write = pl011_console_write,
|
||||
.device = uart_console_device,
|
||||
.setup = pl011_console_setup,
|
||||
+ .match = pl011_console_match,
|
||||
.flags = CON_PRINTBUFFER,
|
||||
.index = -1,
|
||||
.data = &amba_reg,
|
|
@ -1,46 +0,0 @@
|
|||
From ce7a9e482dcf66d155e74b39ada1708cf6d9cb25 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Salter <msalter@redhat.com>
|
||||
Date: Wed, 25 Mar 2015 14:17:50 -0400
|
||||
Subject: [PATCH] arm64: avoid needing console= to enable serial console
|
||||
|
||||
Tell kernel to prefer one of the serial ports for console on
|
||||
platforms currently supported (pl011 or 8250). console= on
|
||||
command line will override these assumed preferences. This is
|
||||
just a hack to get the behavior we want from DT provided by
|
||||
firmware.
|
||||
|
||||
Signed-off-by: Mark Salter <msalter@redhat.com>
|
||||
---
|
||||
arch/arm64/kernel/setup.c | 20 ++++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
|
||||
index 9dc67769b6a4..dfac33b47423 100644
|
||||
--- a/arch/arm64/kernel/setup.c
|
||||
+++ b/arch/arm64/kernel/setup.c
|
||||
@@ -417,3 +417,22 @@ static int __init register_kernel_offset_dumper(void)
|
||||
return 0;
|
||||
}
|
||||
__initcall(register_kernel_offset_dumper);
|
||||
+
|
||||
+/*
|
||||
+ * Temporary hack to avoid need for console= on command line
|
||||
+ */
|
||||
+static int __init arm64_console_setup(void)
|
||||
+{
|
||||
+ /* Allow cmdline to override our assumed preferences */
|
||||
+ if (console_set_on_cmdline)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_SERIAL_AMBA_PL011))
|
||||
+ add_preferred_console("ttyAMA", 0, "115200");
|
||||
+
|
||||
+ if (IS_ENABLED(CONFIG_SERIAL_8250))
|
||||
+ add_preferred_console("ttyS", 0, "115200");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+early_initcall(arm64_console_setup);
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,977 @@
|
|||
From 5c4f8b5b68451e5d208a5aefb195fdd108629da4 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:03 +0200
|
||||
Subject: [PATCH 1/6] PCI/ACPI: Extend pci_mcfg_lookup() responsibilities
|
||||
|
||||
In preparation for adding MCFG platform specific quirk handling move
|
||||
CFG resource calculation and ECAM ops assignment to pci_mcfg_lookup().
|
||||
It becomes the gate for further ops and CFG resource manipulation
|
||||
in arch-agnostic code (drivers/acpi/pci_mcfg.c).
|
||||
|
||||
No functionality changes in this patch.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
arch/arm64/kernel/pci.c | 17 +++++------------
|
||||
drivers/acpi/pci_mcfg.c | 28 +++++++++++++++++++++++++---
|
||||
include/linux/pci-acpi.h | 4 +++-
|
||||
3 files changed, 33 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
|
||||
index acf3872..fb439c7 100644
|
||||
--- a/arch/arm64/kernel/pci.c
|
||||
+++ b/arch/arm64/kernel/pci.c
|
||||
@@ -125,24 +125,17 @@ pci_acpi_setup_ecam_mapping(struct acpi_pci_root *root)
|
||||
u16 seg = root->segment;
|
||||
struct pci_config_window *cfg;
|
||||
struct resource cfgres;
|
||||
- unsigned int bsz;
|
||||
+ struct pci_ecam_ops *ecam_ops;
|
||||
+ int ret;
|
||||
|
||||
- /* Use address from _CBA if present, otherwise lookup MCFG */
|
||||
- if (!root->mcfg_addr)
|
||||
- root->mcfg_addr = pci_mcfg_lookup(seg, bus_res);
|
||||
-
|
||||
- if (!root->mcfg_addr) {
|
||||
+ ret = pci_mcfg_lookup(root, &cfgres, &ecam_ops);
|
||||
+ if (ret) {
|
||||
dev_err(&root->device->dev, "%04x:%pR ECAM region not found\n",
|
||||
seg, bus_res);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- bsz = 1 << pci_generic_ecam_ops.bus_shift;
|
||||
- cfgres.start = root->mcfg_addr + bus_res->start * bsz;
|
||||
- cfgres.end = cfgres.start + resource_size(bus_res) * bsz - 1;
|
||||
- cfgres.flags = IORESOURCE_MEM;
|
||||
- cfg = pci_ecam_create(&root->device->dev, &cfgres, bus_res,
|
||||
- &pci_generic_ecam_ops);
|
||||
+ cfg = pci_ecam_create(&root->device->dev, &cfgres, bus_res, ecam_ops);
|
||||
if (IS_ERR(cfg)) {
|
||||
dev_err(&root->device->dev, "%04x:%pR error %ld mapping ECAM\n",
|
||||
seg, bus_res, PTR_ERR(cfg));
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index b5b376e..ffcc651 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/pci-acpi.h>
|
||||
+#include <linux/pci-ecam.h>
|
||||
|
||||
/* Structure to hold entries from the MCFG table */
|
||||
struct mcfg_entry {
|
||||
@@ -35,9 +36,18 @@ struct mcfg_entry {
|
||||
/* List to save MCFG entries */
|
||||
static LIST_HEAD(pci_mcfg_list);
|
||||
|
||||
-phys_addr_t pci_mcfg_lookup(u16 seg, struct resource *bus_res)
|
||||
+int pci_mcfg_lookup(struct acpi_pci_root *root, struct resource *cfgres,
|
||||
+ struct pci_ecam_ops **ecam_ops)
|
||||
{
|
||||
+ struct pci_ecam_ops *ops = &pci_generic_ecam_ops;
|
||||
+ struct resource *bus_res = &root->secondary;
|
||||
+ u16 seg = root->segment;
|
||||
struct mcfg_entry *e;
|
||||
+ struct resource res;
|
||||
+
|
||||
+ /* Use address from _CBA if present, otherwise lookup MCFG */
|
||||
+ if (root->mcfg_addr)
|
||||
+ goto skip_lookup;
|
||||
|
||||
/*
|
||||
* We expect exact match, unless MCFG entry end bus covers more than
|
||||
@@ -45,10 +55,22 @@ phys_addr_t pci_mcfg_lookup(u16 seg, struct resource *bus_res)
|
||||
*/
|
||||
list_for_each_entry(e, &pci_mcfg_list, list) {
|
||||
if (e->segment == seg && e->bus_start == bus_res->start &&
|
||||
- e->bus_end >= bus_res->end)
|
||||
- return e->addr;
|
||||
+ e->bus_end >= bus_res->end) {
|
||||
+ root->mcfg_addr = e->addr;
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
+ if (!root->mcfg_addr)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
+skip_lookup:
|
||||
+ memset(&res, 0, sizeof(res));
|
||||
+ res.start = root->mcfg_addr + (bus_res->start << 20);
|
||||
+ res.end = res.start + (resource_size(bus_res) << 20) - 1;
|
||||
+ res.flags = IORESOURCE_MEM;
|
||||
+ *cfgres = res;
|
||||
+ *ecam_ops = ops;
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
|
||||
index 7d63a66..7a4e83a 100644
|
||||
--- a/include/linux/pci-acpi.h
|
||||
+++ b/include/linux/pci-acpi.h
|
||||
@@ -24,7 +24,9 @@ static inline acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev)
|
||||
}
|
||||
extern phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle);
|
||||
|
||||
-extern phys_addr_t pci_mcfg_lookup(u16 domain, struct resource *bus_res);
|
||||
+struct pci_ecam_ops;
|
||||
+extern int pci_mcfg_lookup(struct acpi_pci_root *root, struct resource *cfgres,
|
||||
+ struct pci_ecam_ops **ecam_ops);
|
||||
|
||||
static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
|
||||
{
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 16c02d9cc0e67b48c343aecc4b5566e729a97683 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:04 +0200
|
||||
Subject: [PATCH 2/6] PCI/ACPI: Check platform specific ECAM quirks
|
||||
|
||||
Some platforms may not be fully compliant with generic set of PCI config
|
||||
accessors. For these cases we implement the way to overwrite CFG accessors
|
||||
set and configuration space range.
|
||||
|
||||
In first place pci_mcfg_parse() saves machine's IDs and revision number
|
||||
(these come from MCFG header) in order to match against known quirk entries.
|
||||
Then the algorithm traverses available quirk list (static array),
|
||||
matches against <oem_id, oem_table_id, rev, domain, bus number range> and
|
||||
returns custom PCI config ops and/or CFG resource structure.
|
||||
|
||||
When adding new quirk there are two possibilities:
|
||||
1. Override default pci_generic_ecam_ops ops but CFG resource comes from MCFG
|
||||
{ "OEM_ID", "OEM_TABLE_ID", <REV>, <DOMAIN>, <BUS_NR>, &foo_ops, MCFG_RES_EMPTY },
|
||||
2. Override default pci_generic_ecam_ops ops and CFG resource. For this case
|
||||
it is also allowed get CFG resource from quirk entry w/o having it in MCFG.
|
||||
{ "OEM_ID", "OEM_TABLE_ID", <REV>, <DOMAIN>, <BUS_NR>, &boo_ops,
|
||||
DEFINE_RES_MEM(START, SIZE) },
|
||||
|
||||
pci_generic_ecam_ops and MCFG entries will be used for platforms
|
||||
free from quirks.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
|
||||
Signed-off-by: Christopher Covington <cov@codeaurora.org>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 80 +++++++++++++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 74 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index ffcc651..2b8acc7 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -32,6 +32,59 @@ struct mcfg_entry {
|
||||
u8 bus_start;
|
||||
u8 bus_end;
|
||||
};
|
||||
+struct mcfg_fixup {
|
||||
+ char oem_id[ACPI_OEM_ID_SIZE + 1];
|
||||
+ char oem_table_id[ACPI_OEM_TABLE_ID_SIZE + 1];
|
||||
+ u32 oem_revision;
|
||||
+ u16 seg;
|
||||
+ struct resource bus_range;
|
||||
+ struct pci_ecam_ops *ops;
|
||||
+ struct resource cfgres;
|
||||
+};
|
||||
+
|
||||
+#define MCFG_DOM_ANY (-1)
|
||||
+#define MCFG_BUS_RANGE(start, end) DEFINE_RES_NAMED((start), \
|
||||
+ ((end) - (start) + 1), \
|
||||
+ NULL, IORESOURCE_BUS)
|
||||
+#define MCFG_BUS_ANY MCFG_BUS_RANGE(0x0, 0xff)
|
||||
+#define MCFG_RES_EMPTY DEFINE_RES_NAMED(0, 0, NULL, 0)
|
||||
+
|
||||
+static struct mcfg_fixup mcfg_quirks[] = {
|
||||
+/* { OEM_ID, OEM_TABLE_ID, REV, DOMAIN, BUS_RANGE, cfgres, ops }, */
|
||||
+};
|
||||
+
|
||||
+static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
|
||||
+static char mcfg_oem_table_id[ACPI_OEM_TABLE_ID_SIZE];
|
||||
+static u32 mcfg_oem_revision;
|
||||
+
|
||||
+static void pci_mcfg_match_quirks(struct acpi_pci_root *root,
|
||||
+ struct resource *cfgres,
|
||||
+ struct pci_ecam_ops **ecam_ops)
|
||||
+{
|
||||
+ struct mcfg_fixup *f;
|
||||
+ int i;
|
||||
+
|
||||
+ /*
|
||||
+ * First match against PCI topology <domain:bus> then use OEM ID, OEM
|
||||
+ * table ID, and OEM revision from MCFG table standard header.
|
||||
+ */
|
||||
+ for (i = 0, f = mcfg_quirks; i < ARRAY_SIZE(mcfg_quirks); i++, f++) {
|
||||
+ if (f->seg == root->segment &&
|
||||
+ resource_contains(&f->bus_range, &root->secondary) &&
|
||||
+ !memcmp(f->oem_id, mcfg_oem_id, ACPI_OEM_ID_SIZE) &&
|
||||
+ !memcmp(f->oem_table_id, mcfg_oem_table_id,
|
||||
+ ACPI_OEM_TABLE_ID_SIZE) &&
|
||||
+ f->oem_revision == mcfg_oem_revision) {
|
||||
+ if (f->cfgres.start)
|
||||
+ *cfgres = f->cfgres;
|
||||
+ if (f->ops)
|
||||
+ *ecam_ops = f->ops;
|
||||
+ dev_info(&root->device->dev, "Applying PCI MCFG quirks for %s %s rev: %d\n",
|
||||
+ f->oem_id, f->oem_table_id, f->oem_revision);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
|
||||
/* List to save MCFG entries */
|
||||
static LIST_HEAD(pci_mcfg_list);
|
||||
@@ -61,14 +114,24 @@ int pci_mcfg_lookup(struct acpi_pci_root *root, struct resource *cfgres,
|
||||
|
||||
}
|
||||
|
||||
- if (!root->mcfg_addr)
|
||||
- return -ENXIO;
|
||||
-
|
||||
skip_lookup:
|
||||
memset(&res, 0, sizeof(res));
|
||||
- res.start = root->mcfg_addr + (bus_res->start << 20);
|
||||
- res.end = res.start + (resource_size(bus_res) << 20) - 1;
|
||||
- res.flags = IORESOURCE_MEM;
|
||||
+ if (root->mcfg_addr) {
|
||||
+ res.start = root->mcfg_addr + (bus_res->start << 20);
|
||||
+ res.end = res.start + (resource_size(bus_res) << 20) - 1;
|
||||
+ res.flags = IORESOURCE_MEM;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Let to override default ECAM ops and CFG resource range.
|
||||
+ * Also, this might even retrieve CFG resource range in case MCFG
|
||||
+ * does not have it. Invalid CFG start address means MCFG firmware bug
|
||||
+ * or we need another quirk in array.
|
||||
+ */
|
||||
+ pci_mcfg_match_quirks(root, &res, &ops);
|
||||
+ if (!res.start)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
*cfgres = res;
|
||||
*ecam_ops = ops;
|
||||
return 0;
|
||||
@@ -101,6 +164,11 @@ static __init int pci_mcfg_parse(struct acpi_table_header *header)
|
||||
list_add(&e->list, &pci_mcfg_list);
|
||||
}
|
||||
|
||||
+ /* Save MCFG IDs and revision for quirks matching */
|
||||
+ memcpy(mcfg_oem_id, header->oem_id, ACPI_OEM_ID_SIZE);
|
||||
+ memcpy(mcfg_oem_table_id, header->oem_table_id, ACPI_OEM_TABLE_ID_SIZE);
|
||||
+ mcfg_oem_revision = header->revision;
|
||||
+
|
||||
pr_info("MCFG table detected, %d entries\n", n);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 2243ab64c12a873e47b72c8e636b40ed09c5f0d4 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:05 +0200
|
||||
Subject: [PATCH 3/6] PCI: thunder-pem: Allow to probe PEM-specific register
|
||||
range for ACPI case
|
||||
|
||||
thunder-pem driver stands for being ACPI based PCI host controller.
|
||||
However, there is no standard way to describe its PEM-specific register
|
||||
ranges in ACPI tables. Thus we add thunder_pem_init() ACPI extension
|
||||
to obtain hardcoded addresses from static resource array.
|
||||
Although it is not pretty, it prevents from creating standard mechanism to
|
||||
handle similar cases in future.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
drivers/pci/host/pci-thunder-pem.c | 61 ++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 48 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
|
||||
index 6abaf80..b048761 100644
|
||||
--- a/drivers/pci/host/pci-thunder-pem.c
|
||||
+++ b/drivers/pci/host/pci-thunder-pem.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_pci.h>
|
||||
+#include <linux/pci-acpi.h>
|
||||
#include <linux/pci-ecam.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
@@ -284,6 +285,40 @@ static int thunder_pem_config_write(struct pci_bus *bus, unsigned int devfn,
|
||||
return pci_generic_config_write(bus, devfn, where, size, val);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_ACPI
|
||||
+static struct resource thunder_pem_reg_res[] = {
|
||||
+ [4] = DEFINE_RES_MEM(0x87e0c0000000UL, SZ_16M),
|
||||
+ [5] = DEFINE_RES_MEM(0x87e0c1000000UL, SZ_16M),
|
||||
+ [6] = DEFINE_RES_MEM(0x87e0c2000000UL, SZ_16M),
|
||||
+ [7] = DEFINE_RES_MEM(0x87e0c3000000UL, SZ_16M),
|
||||
+ [8] = DEFINE_RES_MEM(0x87e0c4000000UL, SZ_16M),
|
||||
+ [9] = DEFINE_RES_MEM(0x87e0c5000000UL, SZ_16M),
|
||||
+ [14] = DEFINE_RES_MEM(0x97e0c0000000UL, SZ_16M),
|
||||
+ [15] = DEFINE_RES_MEM(0x97e0c1000000UL, SZ_16M),
|
||||
+ [16] = DEFINE_RES_MEM(0x97e0c2000000UL, SZ_16M),
|
||||
+ [17] = DEFINE_RES_MEM(0x97e0c3000000UL, SZ_16M),
|
||||
+ [18] = DEFINE_RES_MEM(0x97e0c4000000UL, SZ_16M),
|
||||
+ [19] = DEFINE_RES_MEM(0x97e0c5000000UL, SZ_16M),
|
||||
+};
|
||||
+
|
||||
+static struct resource *thunder_pem_acpi_res(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct acpi_device *adev = to_acpi_device(cfg->parent);
|
||||
+ struct acpi_pci_root *root = acpi_driver_data(adev);
|
||||
+
|
||||
+ if ((root->segment >= 4 && root->segment <= 9) ||
|
||||
+ (root->segment >= 14 && root->segment <= 19))
|
||||
+ return &thunder_pem_reg_res[root->segment];
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+#else
|
||||
+static struct resource *thunder_pem_acpi_res(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static int thunder_pem_init(struct pci_config_window *cfg)
|
||||
{
|
||||
struct device *dev = cfg->parent;
|
||||
@@ -292,24 +327,24 @@ static int thunder_pem_init(struct pci_config_window *cfg)
|
||||
struct thunder_pem_pci *pem_pci;
|
||||
struct platform_device *pdev;
|
||||
|
||||
- /* Only OF support for now */
|
||||
- if (!dev->of_node)
|
||||
- return -EINVAL;
|
||||
-
|
||||
pem_pci = devm_kzalloc(dev, sizeof(*pem_pci), GFP_KERNEL);
|
||||
if (!pem_pci)
|
||||
return -ENOMEM;
|
||||
|
||||
- pdev = to_platform_device(dev);
|
||||
-
|
||||
- /*
|
||||
- * The second register range is the PEM bridge to the PCIe
|
||||
- * bus. It has a different config access method than those
|
||||
- * devices behind the bridge.
|
||||
- */
|
||||
- res_pem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
+ if (acpi_disabled) {
|
||||
+ pdev = to_platform_device(dev);
|
||||
+
|
||||
+ /*
|
||||
+ * The second register range is the PEM bridge to the PCIe
|
||||
+ * bus. It has a different config access method than those
|
||||
+ * devices behind the bridge.
|
||||
+ */
|
||||
+ res_pem = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
||||
+ } else {
|
||||
+ res_pem = thunder_pem_acpi_res(cfg);
|
||||
+ }
|
||||
if (!res_pem) {
|
||||
- dev_err(dev, "missing \"reg[1]\"property\n");
|
||||
+ dev_err(dev, "missing configuration region\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 443d85d47ee00b3f0b6f39d470a11e7eb116817d Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:06 +0200
|
||||
Subject: [PATCH 4/6] PCI: thunder: Enable ACPI PCI controller for ThunderX
|
||||
pass2.x silicon version
|
||||
|
||||
ThunderX PCIe controller to off-chip devices (so-called PEM) is not fully
|
||||
compliant with ECAM standard. It uses non-standard configuration space
|
||||
accessors (see pci_thunder_pem_ops) and custom configuration space granulation
|
||||
(see bus_shift = 24). In order to access configuration space and
|
||||
probe PEM as ACPI based PCI host controller we need to add MCFG quirk
|
||||
infrastructure. This involves:
|
||||
1. Export PEM pci_thunder_pem_ops structure so it is visible to MCFG quirk
|
||||
code.
|
||||
2. New quirk entries for each PEM segment. Each contains platform IDs,
|
||||
mentioned pci_thunder_pem_ops and CFG resources.
|
||||
|
||||
Quirk is considered for ThunderX silicon pass2.x only which is identified
|
||||
via MCFG revision 1.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 27 +++++++++++++++++++++++++++
|
||||
drivers/pci/host/pci-thunder-pem.c | 2 +-
|
||||
include/linux/pci-ecam.h | 4 ++++
|
||||
3 files changed, 32 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index 2b8acc7..1f73d7b 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -51,6 +51,33 @@ struct mcfg_fixup {
|
||||
|
||||
static struct mcfg_fixup mcfg_quirks[] = {
|
||||
/* { OEM_ID, OEM_TABLE_ID, REV, DOMAIN, BUS_RANGE, cfgres, ops }, */
|
||||
+#ifdef CONFIG_PCI_HOST_THUNDER_PEM
|
||||
+ /* SoC pass2.x */
|
||||
+ { "CAVIUM", "THUNDERX", 1, 4, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x88001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 5, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x884057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 6, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x88808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 7, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x89001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 8, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x894057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 9, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x89808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 14, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x98001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 15, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x984057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 16, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x98808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 17, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x99001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 18, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x994057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 1, 19, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x99808f000000UL, 0x39 * SZ_16M) },
|
||||
+#endif
|
||||
};
|
||||
|
||||
static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
|
||||
diff --git a/drivers/pci/host/pci-thunder-pem.c b/drivers/pci/host/pci-thunder-pem.c
|
||||
index b048761..d7c10cc 100644
|
||||
--- a/drivers/pci/host/pci-thunder-pem.c
|
||||
+++ b/drivers/pci/host/pci-thunder-pem.c
|
||||
@@ -367,7 +367,7 @@ static int thunder_pem_init(struct pci_config_window *cfg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static struct pci_ecam_ops pci_thunder_pem_ops = {
|
||||
+struct pci_ecam_ops pci_thunder_pem_ops = {
|
||||
.bus_shift = 24,
|
||||
.init = thunder_pem_init,
|
||||
.pci_ops = {
|
||||
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
|
||||
index 7adad20..65505ea 100644
|
||||
--- a/include/linux/pci-ecam.h
|
||||
+++ b/include/linux/pci-ecam.h
|
||||
@@ -58,6 +58,10 @@ void __iomem *pci_ecam_map_bus(struct pci_bus *bus, unsigned int devfn,
|
||||
int where);
|
||||
/* default ECAM ops */
|
||||
extern struct pci_ecam_ops pci_generic_ecam_ops;
|
||||
+/* ECAM ops for known quirks */
|
||||
+#ifdef CONFIG_PCI_HOST_THUNDER_PEM
|
||||
+extern struct pci_ecam_ops pci_thunder_pem_ops;
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HOST_GENERIC
|
||||
/* for DT-based PCI controllers that support ECAM */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 6eca99cc392a11bb07b9ef88bca71a85f8bbe273 Mon Sep 17 00:00:00 2001
|
||||
From: Tomasz Nowicki <tn@semihalf.com>
|
||||
Date: Fri, 9 Sep 2016 21:24:07 +0200
|
||||
Subject: [PATCH 5/6] PCI: thunder: Enable ACPI PCI controller for ThunderX
|
||||
pass1.x silicon version
|
||||
|
||||
ThunderX pass1.x requires to emulate the EA headers for on-chip devices
|
||||
hence it has to use custom pci_thunder_ecam_ops for accessing PCI config
|
||||
space (pci-thuner-ecam.c). Add new entries to MCFG quirk array where they
|
||||
can be applied while probing ACPI based PCI host controller.
|
||||
|
||||
ThunderX pass1.x is using the same way for accessing off-chip devices
|
||||
(so-called PEM) as silicon pass-2.x so we need to add PEM quirk
|
||||
entries too.
|
||||
|
||||
Quirk is considered for ThunderX silicon pass1.x only which is identified
|
||||
via MCFG revision 2.
|
||||
|
||||
Signed-off-by: Tomasz Nowicki <tn@semihalf.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 45 +++++++++++++++++++++++++++++++++++++
|
||||
drivers/pci/host/pci-thunder-ecam.c | 2 +-
|
||||
include/linux/pci-ecam.h | 3 +++
|
||||
3 files changed, 49 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index 1f73d7b..eb14f74 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -77,6 +77,51 @@ static struct mcfg_fixup mcfg_quirks[] = {
|
||||
DEFINE_RES_MEM(0x994057000000UL, 0x39 * SZ_16M) },
|
||||
{ "CAVIUM", "THUNDERX", 1, 19, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
DEFINE_RES_MEM(0x99808f000000UL, 0x39 * SZ_16M) },
|
||||
+
|
||||
+ /* SoC pass1.x */
|
||||
+ { "CAVIUM", "THUNDERX", 2, 4, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x88001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 5, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x884057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 6, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x88808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 7, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x89001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 8, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x894057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 9, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x89808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 14, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x98001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 15, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x984057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 16, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x98808f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 17, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x99001f000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 18, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x994057000000UL, 0x39 * SZ_16M) },
|
||||
+ { "CAVIUM", "THUNDERX", 2, 19, MCFG_BUS_ANY, &pci_thunder_pem_ops,
|
||||
+ DEFINE_RES_MEM(0x99808f000000UL, 0x39 * SZ_16M) },
|
||||
+#endif
|
||||
+#ifdef CONFIG_PCI_HOST_THUNDER_ECAM
|
||||
+ /* SoC pass1.x */
|
||||
+ { "CAVIUM", "THUNDERX", 2, 0, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 1, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 2, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 3, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 10, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 11, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 12, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
+ { "CAVIUM", "THUNDERX", 2, 13, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
+ MCFG_RES_EMPTY},
|
||||
#endif
|
||||
};
|
||||
|
||||
diff --git a/drivers/pci/host/pci-thunder-ecam.c b/drivers/pci/host/pci-thunder-ecam.c
|
||||
index d50a3dc..b6c17e2 100644
|
||||
--- a/drivers/pci/host/pci-thunder-ecam.c
|
||||
+++ b/drivers/pci/host/pci-thunder-ecam.c
|
||||
@@ -346,7 +346,7 @@ static int thunder_ecam_config_write(struct pci_bus *bus, unsigned int devfn,
|
||||
return pci_generic_config_write(bus, devfn, where, size, val);
|
||||
}
|
||||
|
||||
-static struct pci_ecam_ops pci_thunder_ecam_ops = {
|
||||
+struct pci_ecam_ops pci_thunder_ecam_ops = {
|
||||
.bus_shift = 20,
|
||||
.pci_ops = {
|
||||
.map_bus = pci_ecam_map_bus,
|
||||
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
|
||||
index 65505ea..35f0e81 100644
|
||||
--- a/include/linux/pci-ecam.h
|
||||
+++ b/include/linux/pci-ecam.h
|
||||
@@ -62,6 +62,9 @@ extern struct pci_ecam_ops pci_generic_ecam_ops;
|
||||
#ifdef CONFIG_PCI_HOST_THUNDER_PEM
|
||||
extern struct pci_ecam_ops pci_thunder_pem_ops;
|
||||
#endif
|
||||
+#ifdef CONFIG_PCI_HOST_THUNDER_ECAM
|
||||
+extern struct pci_ecam_ops pci_thunder_ecam_ops;
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HOST_GENERIC
|
||||
/* for DT-based PCI controllers that support ECAM */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 3080ac5bb527155ccdf8490ce221b1c6ad01f502 Mon Sep 17 00:00:00 2001
|
||||
From: Duc Dang <dhdang@apm.com>
|
||||
Date: Sat, 17 Sep 2016 07:24:38 -0700
|
||||
Subject: [PATCH 6/6] PCI/ACPI: xgene: Add ECAM quirk for X-Gene PCIe
|
||||
controller
|
||||
|
||||
PCIe controller in X-Gene SoCs is not ECAM compliant: software
|
||||
needs to configure additional concontroller register to address
|
||||
device at bus:dev:function.
|
||||
|
||||
This patch depends on "ECAM quirks handling for ARM64 platforms"
|
||||
series (http://www.spinics.net/lists/arm-kernel/msg530692.html)
|
||||
to address the limitation above for X-Gene PCIe controller.
|
||||
|
||||
The quirk will only be applied for X-Gene PCIe MCFG table with
|
||||
OEM revison 1, 2, 3 or 4 (PCIe controller v1 and v2 on X-Gene SoCs).
|
||||
|
||||
Signed-off-by: Duc Dang <dhdang@apm.com>
|
||||
---
|
||||
drivers/acpi/pci_mcfg.c | 32 +++++
|
||||
drivers/pci/host/Makefile | 2 +-
|
||||
drivers/pci/host/pci-xgene-ecam.c | 280 ++++++++++++++++++++++++++++++++++++++
|
||||
include/linux/pci-ecam.h | 5 +
|
||||
4 files changed, 318 insertions(+), 1 deletion(-)
|
||||
create mode 100644 drivers/pci/host/pci-xgene-ecam.c
|
||||
|
||||
diff --git a/drivers/acpi/pci_mcfg.c b/drivers/acpi/pci_mcfg.c
|
||||
index eb14f74..635ab24 100644
|
||||
--- a/drivers/acpi/pci_mcfg.c
|
||||
+++ b/drivers/acpi/pci_mcfg.c
|
||||
@@ -123,6 +123,38 @@ static struct mcfg_fixup mcfg_quirks[] = {
|
||||
{ "CAVIUM", "THUNDERX", 2, 13, MCFG_BUS_ANY, &pci_thunder_ecam_ops,
|
||||
MCFG_RES_EMPTY},
|
||||
#endif
|
||||
+#ifdef CONFIG_PCI_XGENE
|
||||
+ {"APM ", "XGENE ", 1, 0, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 1, 1, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 1, 2, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 1, 3, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 1, 4, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 0, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 1, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 2, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 3, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 2, 4, MCFG_BUS_ANY,
|
||||
+ &xgene_v1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 3, 0, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 3, 1, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_1_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 4, 0, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_2_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 4, 1, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_2_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+ {"APM ", "XGENE ", 4, 2, MCFG_BUS_ANY,
|
||||
+ &xgene_v2_2_pcie_ecam_ops, MCFG_RES_EMPTY},
|
||||
+#endif
|
||||
};
|
||||
|
||||
static char mcfg_oem_id[ACPI_OEM_ID_SIZE];
|
||||
diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile
|
||||
index 8843410..af4f505 100644
|
||||
--- a/drivers/pci/host/Makefile
|
||||
+++ b/drivers/pci/host/Makefile
|
||||
@@ -15,7 +15,7 @@ obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o
|
||||
obj-$(CONFIG_PCI_KEYSTONE) += pci-keystone-dw.o pci-keystone.o
|
||||
obj-$(CONFIG_PCIE_XILINX) += pcie-xilinx.o
|
||||
obj-$(CONFIG_PCIE_XILINX_NWL) += pcie-xilinx-nwl.o
|
||||
-obj-$(CONFIG_PCI_XGENE) += pci-xgene.o
|
||||
+obj-$(CONFIG_PCI_XGENE) += pci-xgene.o pci-xgene-ecam.o
|
||||
obj-$(CONFIG_PCI_XGENE_MSI) += pci-xgene-msi.o
|
||||
obj-$(CONFIG_PCI_LAYERSCAPE) += pci-layerscape.o
|
||||
obj-$(CONFIG_PCI_VERSATILE) += pci-versatile.o
|
||||
diff --git a/drivers/pci/host/pci-xgene-ecam.c b/drivers/pci/host/pci-xgene-ecam.c
|
||||
new file mode 100644
|
||||
index 0000000..b66a04f
|
||||
--- /dev/null
|
||||
+++ b/drivers/pci/host/pci-xgene-ecam.c
|
||||
@@ -0,0 +1,280 @@
|
||||
+/*
|
||||
+ * APM X-Gene PCIe ECAM fixup driver
|
||||
+ *
|
||||
+ * Copyright (c) 2016, Applied Micro Circuits Corporation
|
||||
+ * Author:
|
||||
+ * Duc Dang <dhdang@apm.com>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/of_address.h>
|
||||
+#include <linux/of_pci.h>
|
||||
+#include <linux/pci-acpi.h>
|
||||
+#include <linux/platform_device.h>
|
||||
+#include <linux/pci-ecam.h>
|
||||
+
|
||||
+#ifdef CONFIG_ACPI
|
||||
+#define RTDID 0x160
|
||||
+#define ROOT_CAP_AND_CTRL 0x5C
|
||||
+
|
||||
+/* PCIe IP version */
|
||||
+#define XGENE_PCIE_IP_VER_UNKN 0
|
||||
+#define XGENE_PCIE_IP_VER_1 1
|
||||
+#define XGENE_PCIE_IP_VER_2 2
|
||||
+
|
||||
+#define XGENE_CSR_LENGTH 0x10000
|
||||
+
|
||||
+struct xgene_pcie_acpi_root {
|
||||
+ void __iomem *csr_base;
|
||||
+ u32 version;
|
||||
+};
|
||||
+
|
||||
+static int xgene_v1_pcie_ecam_init(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct xgene_pcie_acpi_root *xgene_root;
|
||||
+ struct device *dev = cfg->parent;
|
||||
+ u32 csr_base;
|
||||
+
|
||||
+ xgene_root = devm_kzalloc(dev, sizeof(*xgene_root), GFP_KERNEL);
|
||||
+ if (!xgene_root)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ switch (cfg->res.start) {
|
||||
+ case 0xE0D0000000ULL:
|
||||
+ csr_base = 0x1F2B0000;
|
||||
+ break;
|
||||
+ case 0xD0D0000000ULL:
|
||||
+ csr_base = 0x1F2C0000;
|
||||
+ break;
|
||||
+ case 0x90D0000000ULL:
|
||||
+ csr_base = 0x1F2D0000;
|
||||
+ break;
|
||||
+ case 0xA0D0000000ULL:
|
||||
+ csr_base = 0x1F500000;
|
||||
+ break;
|
||||
+ case 0xC0D0000000ULL:
|
||||
+ csr_base = 0x1F510000;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->csr_base = ioremap(csr_base, XGENE_CSR_LENGTH);
|
||||
+ if (!xgene_root->csr_base) {
|
||||
+ kfree(xgene_root);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->version = XGENE_PCIE_IP_VER_1;
|
||||
+
|
||||
+ cfg->priv = xgene_root;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int xgene_v2_1_pcie_ecam_init(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct xgene_pcie_acpi_root *xgene_root;
|
||||
+ struct device *dev = cfg->parent;
|
||||
+ resource_size_t csr_base;
|
||||
+
|
||||
+ xgene_root = devm_kzalloc(dev, sizeof(*xgene_root), GFP_KERNEL);
|
||||
+ if (!xgene_root)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ switch (cfg->res.start) {
|
||||
+ case 0xC0D0000000ULL:
|
||||
+ csr_base = 0x1F2B0000;
|
||||
+ break;
|
||||
+ case 0xA0D0000000ULL:
|
||||
+ csr_base = 0x1F2C0000;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->csr_base = ioremap(csr_base, XGENE_CSR_LENGTH);
|
||||
+ if (!xgene_root->csr_base) {
|
||||
+ kfree(xgene_root);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->version = XGENE_PCIE_IP_VER_2;
|
||||
+
|
||||
+ cfg->priv = xgene_root;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int xgene_v2_2_pcie_ecam_init(struct pci_config_window *cfg)
|
||||
+{
|
||||
+ struct xgene_pcie_acpi_root *xgene_root;
|
||||
+ struct device *dev = cfg->parent;
|
||||
+ resource_size_t csr_base;
|
||||
+
|
||||
+ xgene_root = devm_kzalloc(dev, sizeof(*xgene_root), GFP_KERNEL);
|
||||
+ if (!xgene_root)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ switch (cfg->res.start) {
|
||||
+ case 0xE0D0000000ULL:
|
||||
+ csr_base = 0x1F2B0000;
|
||||
+ break;
|
||||
+ case 0xA0D0000000ULL:
|
||||
+ csr_base = 0x1F500000;
|
||||
+ break;
|
||||
+ case 0x90D0000000ULL:
|
||||
+ csr_base = 0x1F2D0000;
|
||||
+ break;
|
||||
+ default:
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->csr_base = ioremap(csr_base, XGENE_CSR_LENGTH);
|
||||
+ if (!xgene_root->csr_base) {
|
||||
+ kfree(xgene_root);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ xgene_root->version = XGENE_PCIE_IP_VER_2;
|
||||
+
|
||||
+ cfg->priv = xgene_root;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+/*
|
||||
+ * For Configuration request, RTDID register is used as Bus Number,
|
||||
+ * Device Number and Function number of the header fields.
|
||||
+ */
|
||||
+static void xgene_pcie_set_rtdid_reg(struct pci_bus *bus, uint devfn)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ struct xgene_pcie_acpi_root *port = cfg->priv;
|
||||
+ unsigned int b, d, f;
|
||||
+ u32 rtdid_val = 0;
|
||||
+
|
||||
+ b = bus->number;
|
||||
+ d = PCI_SLOT(devfn);
|
||||
+ f = PCI_FUNC(devfn);
|
||||
+
|
||||
+ if (!pci_is_root_bus(bus))
|
||||
+ rtdid_val = (b << 8) | (d << 3) | f;
|
||||
+
|
||||
+ writel(rtdid_val, port->csr_base + RTDID);
|
||||
+ /* read the register back to ensure flush */
|
||||
+ readl(port->csr_base + RTDID);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * X-Gene PCIe port uses BAR0-BAR1 of RC's configuration space as
|
||||
+ * the translation from PCI bus to native BUS. Entire DDR region
|
||||
+ * is mapped into PCIe space using these registers, so it can be
|
||||
+ * reached by DMA from EP devices. The BAR0/1 of bridge should be
|
||||
+ * hidden during enumeration to avoid the sizing and resource allocation
|
||||
+ * by PCIe core.
|
||||
+ */
|
||||
+static bool xgene_pcie_hide_rc_bars(struct pci_bus *bus, int offset)
|
||||
+{
|
||||
+ if (pci_is_root_bus(bus) && ((offset == PCI_BASE_ADDRESS_0) ||
|
||||
+ (offset == PCI_BASE_ADDRESS_1)))
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void __iomem *xgene_pcie_ecam_map_bus(struct pci_bus *bus,
|
||||
+ unsigned int devfn, int where)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ unsigned int busn = bus->number;
|
||||
+ void __iomem *base;
|
||||
+
|
||||
+ if (busn < cfg->busr.start || busn > cfg->busr.end)
|
||||
+ return NULL;
|
||||
+
|
||||
+ if ((pci_is_root_bus(bus) && devfn != 0) ||
|
||||
+ xgene_pcie_hide_rc_bars(bus, where))
|
||||
+ return NULL;
|
||||
+
|
||||
+ xgene_pcie_set_rtdid_reg(bus, devfn);
|
||||
+
|
||||
+ if (busn > cfg->busr.start)
|
||||
+ base = cfg->win + (1 << cfg->ops->bus_shift);
|
||||
+ else
|
||||
+ base = cfg->win;
|
||||
+
|
||||
+ return base + where;
|
||||
+}
|
||||
+
|
||||
+static int xgene_pcie_config_read32(struct pci_bus *bus, unsigned int devfn,
|
||||
+ int where, int size, u32 *val)
|
||||
+{
|
||||
+ struct pci_config_window *cfg = bus->sysdata;
|
||||
+ struct xgene_pcie_acpi_root *port = cfg->priv;
|
||||
+
|
||||
+ if (pci_generic_config_read32(bus, devfn, where & ~0x3, 4, val) !=
|
||||
+ PCIBIOS_SUCCESSFUL)
|
||||
+ return PCIBIOS_DEVICE_NOT_FOUND;
|
||||
+
|
||||
+ /*
|
||||
+ * The v1 controller has a bug in its Configuration Request
|
||||
+ * Retry Status (CRS) logic: when CRS is enabled and we read the
|
||||
+ * Vendor and Device ID of a non-existent device, the controller
|
||||
+ * fabricates return data of 0xFFFF0001 ("device exists but is not
|
||||
+ * ready") instead of 0xFFFFFFFF ("device does not exist"). This
|
||||
+ * causes the PCI core to retry the read until it times out.
|
||||
+ * Avoid this by not claiming to support CRS.
|
||||
+ */
|
||||
+ if (pci_is_root_bus(bus) && (port->version == XGENE_PCIE_IP_VER_1) &&
|
||||
+ ((where & ~0x3) == ROOT_CAP_AND_CTRL))
|
||||
+ *val &= ~(PCI_EXP_RTCAP_CRSVIS << 16);
|
||||
+
|
||||
+ if (size <= 2)
|
||||
+ *val = (*val >> (8 * (where & 3))) & ((1 << (size * 8)) - 1);
|
||||
+
|
||||
+ return PCIBIOS_SUCCESSFUL;
|
||||
+}
|
||||
+
|
||||
+struct pci_ecam_ops xgene_v1_pcie_ecam_ops = {
|
||||
+ .bus_shift = 16,
|
||||
+ .init = xgene_v1_pcie_ecam_init,
|
||||
+ .pci_ops = {
|
||||
+ .map_bus = xgene_pcie_ecam_map_bus,
|
||||
+ .read = xgene_pcie_config_read32,
|
||||
+ .write = pci_generic_config_write,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+struct pci_ecam_ops xgene_v2_1_pcie_ecam_ops = {
|
||||
+ .bus_shift = 16,
|
||||
+ .init = xgene_v2_1_pcie_ecam_init,
|
||||
+ .pci_ops = {
|
||||
+ .map_bus = xgene_pcie_ecam_map_bus,
|
||||
+ .read = xgene_pcie_config_read32,
|
||||
+ .write = pci_generic_config_write,
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+struct pci_ecam_ops xgene_v2_2_pcie_ecam_ops = {
|
||||
+ .bus_shift = 16,
|
||||
+ .init = xgene_v2_2_pcie_ecam_init,
|
||||
+ .pci_ops = {
|
||||
+ .map_bus = xgene_pcie_ecam_map_bus,
|
||||
+ .read = xgene_pcie_config_read32,
|
||||
+ .write = pci_generic_config_write,
|
||||
+ }
|
||||
+};
|
||||
+#endif
|
||||
diff --git a/include/linux/pci-ecam.h b/include/linux/pci-ecam.h
|
||||
index 35f0e81..40da3e7 100644
|
||||
--- a/include/linux/pci-ecam.h
|
||||
+++ b/include/linux/pci-ecam.h
|
||||
@@ -65,6 +65,11 @@ extern struct pci_ecam_ops pci_thunder_pem_ops;
|
||||
#ifdef CONFIG_PCI_HOST_THUNDER_ECAM
|
||||
extern struct pci_ecam_ops pci_thunder_ecam_ops;
|
||||
#endif
|
||||
+#ifdef CONFIG_PCI_XGENE
|
||||
+extern struct pci_ecam_ops xgene_v1_pcie_ecam_ops;
|
||||
+extern struct pci_ecam_ops xgene_v2_1_pcie_ecam_ops;
|
||||
+extern struct pci_ecam_ops xgene_v2_2_pcie_ecam_ops;
|
||||
+#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HOST_GENERIC
|
||||
/* for DT-based PCI controllers that support ECAM */
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -1,32 +1,3 @@
|
|||
From da77f737f9f5a487f3a1f80f8546585ee18cd7b9 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Fri, 4 Mar 2016 10:39:28 -0800
|
||||
Subject: [PATCH 27/36] dt-bindings: Add root properties for Raspberry Pi 3
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Acked-by: Rob Herring <robh@kernel.org>
|
||||
---
|
||||
Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
index 11d3056..6ffe087 100644
|
||||
--- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm2835.txt
|
||||
@@ -30,6 +30,10 @@ Raspberry Pi 2 Model B
|
||||
Required root node properties:
|
||||
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
|
||||
|
||||
+Raspberry Pi 3 Model B
|
||||
+Required root node properties:
|
||||
+compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
|
||||
+
|
||||
Raspberry Pi Compute Module
|
||||
Required root node properties:
|
||||
compatible = "raspberrypi,compute-module", "brcm,bcm2835";
|
||||
--
|
||||
2.7.3
|
||||
|
||||
From a2858804c7f5f4585b718543236b7ba3b3ec813a Mon Sep 17 00:00:00 2001
|
||||
From: Peter Robinson <pbrobinson@gmail.com>
|
||||
Date: Mon, 29 Aug 2016 09:14:15 +0100
|
||||
|
@ -180,153 +151,3 @@ index 0000000..8216bbb
|
|||
+};
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From fc07a6d394f41a98f839507580082184ac684912 Mon Sep 17 00:00:00 2001
|
||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Date: Mon, 2 May 2016 09:06:51 +0200
|
||||
Subject: [PATCH 1/2] ARM: bcm2835: dt: Add the ethernet to the device trees
|
||||
|
||||
The hub and the ethernet in its port 1 are hardwired on the board.
|
||||
|
||||
Compared to the adapters that can be plugged into the USB ports, this
|
||||
one has no serial EEPROM to store its MAC. Nevertheless, the Raspberry Pi
|
||||
has the MAC address for this adapter in its ROM, accessible from its
|
||||
firmware.
|
||||
|
||||
U-Boot can read out the address and set the local-mac-address property of the
|
||||
node with "ethernet" alias. Let's add the node so that U-Boot can do its
|
||||
business.
|
||||
|
||||
Model B rev2 and Model B+ entries were verified by me, the hierarchy and
|
||||
pid/vid pair for the Version 2 was provided by Peter Chen. Original
|
||||
Model B is a blind shot, though very likely correct.
|
||||
|
||||
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
|
||||
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2835-rpi-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 1 +
|
||||
arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi | 19 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi | 19 +++++++++++++++++++
|
||||
arch/arm/boot/dts/bcm283x.dtsi | 2 ++
|
||||
7 files changed, 44 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
create mode 100644 arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
index 57d313b..d5fdb8e 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b-plus", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
index cf2774e..bfc4bd9 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9512.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
index 8b15f9c..0371bb7 100644
|
||||
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2835.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9512.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,model-b", "brcm,bcm2835";
|
||||
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
index c4743f4..29e1cfe 100644
|
||||
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
|
||||
@@ -1,6 +1,7 @@
|
||||
/dts-v1/;
|
||||
#include "bcm2836.dtsi"
|
||||
#include "bcm2835-rpi.dtsi"
|
||||
+#include "bcm283x-rpi-smsc9514.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "raspberrypi,2-model-b", "brcm,bcm2836";
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..12c981e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9512.dtsi
|
||||
@@ -0,0 +1,19 @@
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ ethernet = ðernet;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ usb1@1 {
|
||||
+ compatible = "usb424,9512";
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethernet: usbether@1 {
|
||||
+ compatible = "usb424,ec00";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
new file mode 100644
|
||||
index 0000000..3f0a56e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/bcm283x-rpi-smsc9514.dtsi
|
||||
@@ -0,0 +1,19 @@
|
||||
+/ {
|
||||
+ aliases {
|
||||
+ ethernet = ðernet;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&usb {
|
||||
+ usb1@1 {
|
||||
+ compatible = "usb424,9514";
|
||||
+ reg = <1>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ ethernet: usbether@1 {
|
||||
+ compatible = "usb424,ec00";
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
index 10b27b9..b982522 100644
|
||||
--- a/arch/arm/boot/dts/bcm283x.dtsi
|
||||
+++ b/arch/arm/boot/dts/bcm283x.dtsi
|
||||
@@ -287,6 +287,8 @@
|
||||
compatible = "brcm,bcm2835-usb";
|
||||
reg = <0x7e980000 0x10000>;
|
||||
interrupts = <1 9>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
};
|
||||
|
||||
v3d: v3d@7ec00000 {
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
|
|
@ -0,0 +1,636 @@
|
|||
From 9db79f3a51c97e0cfcde1b25299e8db9ee3d64ab Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 14 Sep 2016 19:21:29 +0100
|
||||
Subject: [PATCH 1/4] drm/vc4: Fall back to using an EDID probe in the absence
|
||||
of a GPIO.
|
||||
|
||||
On Pi0/1/2, we use an external GPIO line for hotplug detection, since
|
||||
the HDMI_HOTPLUG register isn't connected to anything. However, with
|
||||
the Pi3 the HPD GPIO line has moved off to a GPIO expander that will
|
||||
be tricky to get to (the firmware is constantly polling the expander
|
||||
using i2c0, so we'll need to coordinate with it).
|
||||
|
||||
As a stop-gap, if we don't have a GPIO line, use an EDID probe to
|
||||
detect connection. Fixes HDMI display on the pi3.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
index 4452f36..5adc0c7 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
@@ -174,6 +174,9 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force)
|
||||
return connector_status_disconnected;
|
||||
}
|
||||
|
||||
+ if (drm_probe_ddc(vc4->hdmi->ddc))
|
||||
+ return connector_status_connected;
|
||||
+
|
||||
if (HDMI_READ(VC4_HDMI_HOTPLUG) & VC4_HDMI_HOTPLUG_CONNECTED)
|
||||
return connector_status_connected;
|
||||
else
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 7b4c39f34fbbdfe0cd0e626686ee01ab96601598 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Fri, 16 Sep 2016 10:59:45 +0100
|
||||
Subject: [PATCH 2/4] drm/vc4: Enable limited range RGB output on HDMI with CEA
|
||||
modes.
|
||||
|
||||
Fixes broken grayscale ramps on many HDMI monitors, where large areas
|
||||
at the ends of the ramp would all appear as black or white.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_hdmi.c | 31 +++++++++++++++++++++++++++++--
|
||||
drivers/gpu/drm/vc4/vc4_regs.h | 9 ++++++++-
|
||||
2 files changed, 37 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
index 5adc0c7..5df4e74 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
@@ -276,6 +276,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
struct drm_display_mode *unadjusted_mode,
|
||||
struct drm_display_mode *mode)
|
||||
{
|
||||
+ struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder);
|
||||
struct drm_device *dev = encoder->dev;
|
||||
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
bool debug_dump_regs = false;
|
||||
@@ -291,6 +292,7 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
u32 vertb = (VC4_SET_FIELD(0, VC4_HDMI_VERTB_VSPO) |
|
||||
VC4_SET_FIELD(mode->vtotal - mode->vsync_end,
|
||||
VC4_HDMI_VERTB_VBP));
|
||||
+ u32 csc_ctl;
|
||||
|
||||
if (debug_dump_regs) {
|
||||
DRM_INFO("HDMI regs before:\n");
|
||||
@@ -329,9 +331,34 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
(vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
|
||||
(hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
|
||||
|
||||
+ csc_ctl = VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR,
|
||||
+ VC4_HD_CSC_CTL_ORDER);
|
||||
+
|
||||
+ if (vc4_encoder->hdmi_monitor && drm_match_cea_mode(mode) > 1) {
|
||||
+ /* CEA VICs other than #1 requre limited range RGB
|
||||
+ * output. Apply a colorspace conversion to squash
|
||||
+ * 0-255 down to 16-235. The matrix here is:
|
||||
+ *
|
||||
+ * [ 0 0 0.8594 16]
|
||||
+ * [ 0 0.8594 0 16]
|
||||
+ * [ 0.8594 0 0 16]
|
||||
+ * [ 0 0 0 1]
|
||||
+ */
|
||||
+ csc_ctl |= VC4_HD_CSC_CTL_ENABLE;
|
||||
+ csc_ctl |= VC4_HD_CSC_CTL_RGB2YCC;
|
||||
+ csc_ctl |= VC4_SET_FIELD(VC4_HD_CSC_CTL_MODE_CUSTOM,
|
||||
+ VC4_HD_CSC_CTL_MODE);
|
||||
+
|
||||
+ HD_WRITE(VC4_HD_CSC_12_11, (0x000 << 16) | 0x000);
|
||||
+ HD_WRITE(VC4_HD_CSC_14_13, (0x100 << 16) | 0x6e0);
|
||||
+ HD_WRITE(VC4_HD_CSC_22_21, (0x6e0 << 16) | 0x000);
|
||||
+ HD_WRITE(VC4_HD_CSC_24_23, (0x100 << 16) | 0x000);
|
||||
+ HD_WRITE(VC4_HD_CSC_32_31, (0x000 << 16) | 0x6e0);
|
||||
+ HD_WRITE(VC4_HD_CSC_34_33, (0x100 << 16) | 0x000);
|
||||
+ }
|
||||
+
|
||||
/* The RGB order applies even when CSC is disabled. */
|
||||
- HD_WRITE(VC4_HD_CSC_CTL, VC4_SET_FIELD(VC4_HD_CSC_CTL_ORDER_BGR,
|
||||
- VC4_HD_CSC_CTL_ORDER));
|
||||
+ HD_WRITE(VC4_HD_CSC_CTL, csc_ctl);
|
||||
|
||||
HDMI_WRITE(VC4_HDMI_FIFO_CTL, VC4_HDMI_FIFO_CTL_MASTER_SLAVE_N);
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
index 160942a..9ecd6ff 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
@@ -528,10 +528,17 @@
|
||||
# define VC4_HD_CSC_CTL_MODE_SHIFT 2
|
||||
# define VC4_HD_CSC_CTL_MODE_RGB_TO_SD_YPRPB 0
|
||||
# define VC4_HD_CSC_CTL_MODE_RGB_TO_HD_YPRPB 1
|
||||
-# define VC4_HD_CSC_CTL_MODE_CUSTOM 2
|
||||
+# define VC4_HD_CSC_CTL_MODE_CUSTOM 3
|
||||
# define VC4_HD_CSC_CTL_RGB2YCC BIT(1)
|
||||
# define VC4_HD_CSC_CTL_ENABLE BIT(0)
|
||||
|
||||
+#define VC4_HD_CSC_12_11 0x044
|
||||
+#define VC4_HD_CSC_14_13 0x048
|
||||
+#define VC4_HD_CSC_22_21 0x04c
|
||||
+#define VC4_HD_CSC_24_23 0x050
|
||||
+#define VC4_HD_CSC_32_31 0x054
|
||||
+#define VC4_HD_CSC_34_33 0x058
|
||||
+
|
||||
#define VC4_HD_FRAME_COUNT 0x068
|
||||
|
||||
/* HVS display list information. */
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From 107d3188b3723840deddaa5efeffcaf167e462f2 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 28 Sep 2016 08:42:42 -0700
|
||||
Subject: [PATCH 3/4] drm/vc4: Fix races when the CS reads from render targets.
|
||||
|
||||
With the introduction of bin/render pipelining, the previous job may
|
||||
not be completed when we start binning the next one. If the previous
|
||||
job wrote our VBO, IB, or CS textures, then the binning stage might
|
||||
get stale or uninitialized results.
|
||||
|
||||
Fixes the major rendering failure in glmark2 -b terrain.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
Fixes: ca26d28bbaa3 ("drm/vc4: improve throughput by pipelining binning and rendering jobs")
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_drv.h | 19 ++++++++++++++++++-
|
||||
drivers/gpu/drm/vc4/vc4_gem.c | 13 +++++++++++++
|
||||
drivers/gpu/drm/vc4/vc4_render_cl.c | 21 +++++++++++++++++----
|
||||
drivers/gpu/drm/vc4/vc4_validate.c | 17 ++++++++++++++---
|
||||
4 files changed, 62 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
index 428e249..f696b75 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
|
||||
@@ -122,9 +122,16 @@ to_vc4_dev(struct drm_device *dev)
|
||||
struct vc4_bo {
|
||||
struct drm_gem_cma_object base;
|
||||
|
||||
- /* seqno of the last job to render to this BO. */
|
||||
+ /* seqno of the last job to render using this BO. */
|
||||
uint64_t seqno;
|
||||
|
||||
+ /* seqno of the last job to use the RCL to write to this BO.
|
||||
+ *
|
||||
+ * Note that this doesn't include binner overflow memory
|
||||
+ * writes.
|
||||
+ */
|
||||
+ uint64_t write_seqno;
|
||||
+
|
||||
/* List entry for the BO's position in either
|
||||
* vc4_exec_info->unref_list or vc4_dev->bo_cache.time_list
|
||||
*/
|
||||
@@ -216,6 +223,9 @@ struct vc4_exec_info {
|
||||
/* Sequence number for this bin/render job. */
|
||||
uint64_t seqno;
|
||||
|
||||
+ /* Latest write_seqno of any BO that binning depends on. */
|
||||
+ uint64_t bin_dep_seqno;
|
||||
+
|
||||
/* Last current addresses the hardware was processing when the
|
||||
* hangcheck timer checked on us.
|
||||
*/
|
||||
@@ -230,6 +240,13 @@ struct vc4_exec_info {
|
||||
struct drm_gem_cma_object **bo;
|
||||
uint32_t bo_count;
|
||||
|
||||
+ /* List of BOs that are being written by the RCL. Other than
|
||||
+ * the binner temporary storage, this is all the BOs written
|
||||
+ * by the job.
|
||||
+ */
|
||||
+ struct drm_gem_cma_object *rcl_write_bo[4];
|
||||
+ uint32_t rcl_write_bo_count;
|
||||
+
|
||||
/* Pointers for our position in vc4->job_list */
|
||||
struct list_head head;
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
index b262c5c..ae1609e 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
|
||||
@@ -471,6 +471,11 @@ vc4_update_bo_seqnos(struct vc4_exec_info *exec, uint64_t seqno)
|
||||
list_for_each_entry(bo, &exec->unref_list, unref_head) {
|
||||
bo->seqno = seqno;
|
||||
}
|
||||
+
|
||||
+ for (i = 0; i < exec->rcl_write_bo_count; i++) {
|
||||
+ bo = to_vc4_bo(&exec->rcl_write_bo[i]->base);
|
||||
+ bo->write_seqno = seqno;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Queues a struct vc4_exec_info for execution. If no job is
|
||||
@@ -673,6 +678,14 @@ vc4_get_bcl(struct drm_device *dev, struct vc4_exec_info *exec)
|
||||
goto fail;
|
||||
|
||||
ret = vc4_validate_shader_recs(dev, exec);
|
||||
+ if (ret)
|
||||
+ goto fail;
|
||||
+
|
||||
+ /* Block waiting on any previous rendering into the CS's VBO,
|
||||
+ * IB, or textures, so that pixels are actually written by the
|
||||
+ * time we try to read them.
|
||||
+ */
|
||||
+ ret = vc4_wait_for_seqno(dev, exec->bin_dep_seqno, ~0ull, true);
|
||||
|
||||
fail:
|
||||
drm_free_large(temp);
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/vc4_render_cl.c
|
||||
index 0f12418..08886a3 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_render_cl.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_render_cl.c
|
||||
@@ -45,6 +45,8 @@ struct vc4_rcl_setup {
|
||||
|
||||
struct drm_gem_cma_object *rcl;
|
||||
u32 next_offset;
|
||||
+
|
||||
+ u32 next_write_bo_index;
|
||||
};
|
||||
|
||||
static inline void rcl_u8(struct vc4_rcl_setup *setup, u8 val)
|
||||
@@ -407,6 +409,8 @@ static int vc4_rcl_msaa_surface_setup(struct vc4_exec_info *exec,
|
||||
if (!*obj)
|
||||
return -EINVAL;
|
||||
|
||||
+ exec->rcl_write_bo[exec->rcl_write_bo_count++] = *obj;
|
||||
+
|
||||
if (surf->offset & 0xf) {
|
||||
DRM_ERROR("MSAA write must be 16b aligned.\n");
|
||||
return -EINVAL;
|
||||
@@ -417,7 +421,8 @@ static int vc4_rcl_msaa_surface_setup(struct vc4_exec_info *exec,
|
||||
|
||||
static int vc4_rcl_surface_setup(struct vc4_exec_info *exec,
|
||||
struct drm_gem_cma_object **obj,
|
||||
- struct drm_vc4_submit_rcl_surface *surf)
|
||||
+ struct drm_vc4_submit_rcl_surface *surf,
|
||||
+ bool is_write)
|
||||
{
|
||||
uint8_t tiling = VC4_GET_FIELD(surf->bits,
|
||||
VC4_LOADSTORE_TILE_BUFFER_TILING);
|
||||
@@ -440,6 +445,9 @@ static int vc4_rcl_surface_setup(struct vc4_exec_info *exec,
|
||||
if (!*obj)
|
||||
return -EINVAL;
|
||||
|
||||
+ if (is_write)
|
||||
+ exec->rcl_write_bo[exec->rcl_write_bo_count++] = *obj;
|
||||
+
|
||||
if (surf->flags & VC4_SUBMIT_RCL_SURFACE_READ_IS_FULL_RES) {
|
||||
if (surf == &exec->args->zs_write) {
|
||||
DRM_ERROR("general zs write may not be a full-res.\n");
|
||||
@@ -542,6 +550,8 @@ vc4_rcl_render_config_surface_setup(struct vc4_exec_info *exec,
|
||||
if (!*obj)
|
||||
return -EINVAL;
|
||||
|
||||
+ exec->rcl_write_bo[exec->rcl_write_bo_count++] = *obj;
|
||||
+
|
||||
if (tiling > VC4_TILING_FORMAT_LT) {
|
||||
DRM_ERROR("Bad tiling format\n");
|
||||
return -EINVAL;
|
||||
@@ -599,15 +609,18 @@ int vc4_get_rcl(struct drm_device *dev, struct vc4_exec_info *exec)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = vc4_rcl_surface_setup(exec, &setup.color_read, &args->color_read);
|
||||
+ ret = vc4_rcl_surface_setup(exec, &setup.color_read, &args->color_read,
|
||||
+ false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = vc4_rcl_surface_setup(exec, &setup.zs_read, &args->zs_read);
|
||||
+ ret = vc4_rcl_surface_setup(exec, &setup.zs_read, &args->zs_read,
|
||||
+ false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- ret = vc4_rcl_surface_setup(exec, &setup.zs_write, &args->zs_write);
|
||||
+ ret = vc4_rcl_surface_setup(exec, &setup.zs_write, &args->zs_write,
|
||||
+ true);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c
|
||||
index 9ce1d0a..26503e3 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_validate.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_validate.c
|
||||
@@ -267,6 +267,9 @@ validate_indexed_prim_list(VALIDATE_ARGS)
|
||||
if (!ib)
|
||||
return -EINVAL;
|
||||
|
||||
+ exec->bin_dep_seqno = max(exec->bin_dep_seqno,
|
||||
+ to_vc4_bo(&ib->base)->write_seqno);
|
||||
+
|
||||
if (offset > ib->base.size ||
|
||||
(ib->base.size - offset) / index_size < length) {
|
||||
DRM_ERROR("IB access overflow (%d + %d*%d > %zd)\n",
|
||||
@@ -555,8 +558,7 @@ static bool
|
||||
reloc_tex(struct vc4_exec_info *exec,
|
||||
void *uniform_data_u,
|
||||
struct vc4_texture_sample_info *sample,
|
||||
- uint32_t texture_handle_index)
|
||||
-
|
||||
+ uint32_t texture_handle_index, bool is_cs)
|
||||
{
|
||||
struct drm_gem_cma_object *tex;
|
||||
uint32_t p0 = *(uint32_t *)(uniform_data_u + sample->p_offset[0]);
|
||||
@@ -714,6 +716,11 @@ reloc_tex(struct vc4_exec_info *exec,
|
||||
|
||||
*validated_p0 = tex->paddr + p0;
|
||||
|
||||
+ if (is_cs) {
|
||||
+ exec->bin_dep_seqno = max(exec->bin_dep_seqno,
|
||||
+ to_vc4_bo(&tex->base)->write_seqno);
|
||||
+ }
|
||||
+
|
||||
return true;
|
||||
fail:
|
||||
DRM_INFO("Texture p0 at %d: 0x%08x\n", sample->p_offset[0], p0);
|
||||
@@ -835,7 +842,8 @@ validate_gl_shader_rec(struct drm_device *dev,
|
||||
if (!reloc_tex(exec,
|
||||
uniform_data_u,
|
||||
&validated_shader->texture_samples[tex],
|
||||
- texture_handles_u[tex])) {
|
||||
+ texture_handles_u[tex],
|
||||
+ i == 2)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
@@ -867,6 +875,9 @@ validate_gl_shader_rec(struct drm_device *dev,
|
||||
uint32_t stride = *(uint8_t *)(pkt_u + o + 5);
|
||||
uint32_t max_index;
|
||||
|
||||
+ exec->bin_dep_seqno = max(exec->bin_dep_seqno,
|
||||
+ to_vc4_bo(&vbo->base)->write_seqno);
|
||||
+
|
||||
if (state->addr & 0x8)
|
||||
stride |= (*(uint32_t *)(pkt_u + 100 + i * 4)) & ~0xff;
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From f379f5432e4b74e3d1d894ce2fefbe1b8a3c24fd Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Wed, 28 Sep 2016 19:20:44 -0700
|
||||
Subject: [PATCH 4/4] drm/vc4: Increase timeout for HDMI_SCHEDULER_CONTROL
|
||||
changes.
|
||||
|
||||
Fixes occasional debug spew at boot when connected directly through
|
||||
HDMI, and probably confusing the HDMI state machine when we go trying
|
||||
to poke registers for the enable sequence too soon.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
index 5df4e74..9a6883d 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
@@ -399,7 +399,7 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
|
||||
VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI);
|
||||
|
||||
ret = wait_for(HDMI_READ(VC4_HDMI_SCHEDULER_CONTROL) &
|
||||
- VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE, 1);
|
||||
+ VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE, 1000);
|
||||
WARN_ONCE(ret, "Timeout waiting for "
|
||||
"VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE\n");
|
||||
} else {
|
||||
@@ -411,7 +411,7 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
|
||||
~VC4_HDMI_SCHEDULER_CONTROL_MODE_HDMI);
|
||||
|
||||
ret = wait_for(!(HDMI_READ(VC4_HDMI_SCHEDULER_CONTROL) &
|
||||
- VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE), 1);
|
||||
+ VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE), 1000);
|
||||
WARN_ONCE(ret, "Timeout waiting for "
|
||||
"!VC4_HDMI_SCHEDULER_CONTROL_HDMI_ACTIVE\n");
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
||||
From bd712d14886c37eb804036b2ac3036df79d33476 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Anholt <eric@anholt.net>
|
||||
Date: Thu, 29 Sep 2016 15:34:43 -0700
|
||||
Subject: [PATCH] drm/vc4: Set up the AVI and SPD infoframes.
|
||||
|
||||
Fixes a purple bar on the left side of the screen with my Dell
|
||||
2408WFP. It will also be required for supporting the double-clocked
|
||||
video modes.
|
||||
|
||||
Signed-off-by: Eric Anholt <eric@anholt.net>
|
||||
---
|
||||
drivers/gpu/drm/vc4/vc4_hdmi.c | 136 +++++++++++++++++++++++++++++++++++++++--
|
||||
drivers/gpu/drm/vc4/vc4_regs.h | 5 ++
|
||||
2 files changed, 136 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
index 9a6883d..f722334 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||||
@@ -62,6 +62,8 @@ struct vc4_hdmi {
|
||||
struct vc4_hdmi_encoder {
|
||||
struct vc4_encoder base;
|
||||
bool hdmi_monitor;
|
||||
+ bool limited_rgb_range;
|
||||
+ bool rgb_range_selectable;
|
||||
};
|
||||
|
||||
static inline struct vc4_hdmi_encoder *
|
||||
@@ -205,6 +207,12 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector)
|
||||
return -ENODEV;
|
||||
|
||||
vc4_encoder->hdmi_monitor = drm_detect_hdmi_monitor(edid);
|
||||
+
|
||||
+ if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {
|
||||
+ vc4_encoder->rgb_range_selectable =
|
||||
+ drm_rgb_quant_range_selectable(edid);
|
||||
+ }
|
||||
+
|
||||
drm_mode_connector_update_edid_property(connector, edid);
|
||||
ret = drm_add_edid_modes(connector, edid);
|
||||
|
||||
@@ -272,6 +280,117 @@ static const struct drm_encoder_funcs vc4_hdmi_encoder_funcs = {
|
||||
.destroy = vc4_hdmi_encoder_destroy,
|
||||
};
|
||||
|
||||
+static int vc4_hdmi_stop_packet(struct drm_encoder *encoder,
|
||||
+ enum hdmi_infoframe_type type)
|
||||
+{
|
||||
+ struct drm_device *dev = encoder->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ u32 packet_id = type - 0x80;
|
||||
+
|
||||
+ HDMI_WRITE(VC4_HDMI_RAM_PACKET_CONFIG,
|
||||
+ HDMI_READ(VC4_HDMI_RAM_PACKET_CONFIG) & ~BIT(packet_id));
|
||||
+
|
||||
+ return wait_for(!(HDMI_READ(VC4_HDMI_RAM_PACKET_STATUS) &
|
||||
+ BIT(packet_id)), 100);
|
||||
+}
|
||||
+
|
||||
+static void vc4_hdmi_write_infoframe(struct drm_encoder *encoder,
|
||||
+ union hdmi_infoframe *frame)
|
||||
+{
|
||||
+ struct drm_device *dev = encoder->dev;
|
||||
+ struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
+ u32 packet_id = frame->any.type - 0x80;
|
||||
+ u32 packet_reg = VC4_HDMI_GCP_0 + VC4_HDMI_PACKET_STRIDE * packet_id;
|
||||
+ uint8_t buffer[VC4_HDMI_PACKET_STRIDE];
|
||||
+ ssize_t len, i;
|
||||
+ int ret;
|
||||
+
|
||||
+ WARN_ONCE(!(HDMI_READ(VC4_HDMI_RAM_PACKET_CONFIG) &
|
||||
+ VC4_HDMI_RAM_PACKET_ENABLE),
|
||||
+ "Packet RAM has to be on to store the packet.");
|
||||
+
|
||||
+ len = hdmi_infoframe_pack(frame, buffer, sizeof(buffer));
|
||||
+ if (len < 0)
|
||||
+ return;
|
||||
+
|
||||
+ ret = vc4_hdmi_stop_packet(encoder, frame->any.type);
|
||||
+ if (ret) {
|
||||
+ DRM_ERROR("Failed to wait for infoframe to go idle: %d\n", ret);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < len; i += 7) {
|
||||
+ HDMI_WRITE(packet_reg,
|
||||
+ buffer[i + 0] << 0 |
|
||||
+ buffer[i + 1] << 8 |
|
||||
+ buffer[i + 2] << 16);
|
||||
+ packet_reg += 4;
|
||||
+
|
||||
+ HDMI_WRITE(packet_reg,
|
||||
+ buffer[i + 3] << 0 |
|
||||
+ buffer[i + 4] << 8 |
|
||||
+ buffer[i + 5] << 16 |
|
||||
+ buffer[i + 6] << 24);
|
||||
+ packet_reg += 4;
|
||||
+ }
|
||||
+
|
||||
+ HDMI_WRITE(VC4_HDMI_RAM_PACKET_CONFIG,
|
||||
+ HDMI_READ(VC4_HDMI_RAM_PACKET_CONFIG) | BIT(packet_id));
|
||||
+ ret = wait_for((HDMI_READ(VC4_HDMI_RAM_PACKET_STATUS) &
|
||||
+ BIT(packet_id)), 100);
|
||||
+ if (ret)
|
||||
+ DRM_ERROR("Failed to wait for infoframe to start: %d\n", ret);
|
||||
+}
|
||||
+
|
||||
+static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ struct vc4_hdmi_encoder *vc4_encoder = to_vc4_hdmi_encoder(encoder);
|
||||
+ struct drm_crtc *crtc = encoder->crtc;
|
||||
+ const struct drm_display_mode *mode = &crtc->state->adjusted_mode;
|
||||
+ union hdmi_infoframe frame;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi, mode);
|
||||
+ if (ret < 0) {
|
||||
+ DRM_ERROR("couldn't fill AVI infoframe\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (vc4_encoder->rgb_range_selectable) {
|
||||
+ if (vc4_encoder->limited_rgb_range) {
|
||||
+ frame.avi.quantization_range =
|
||||
+ HDMI_QUANTIZATION_RANGE_LIMITED;
|
||||
+ } else {
|
||||
+ frame.avi.quantization_range =
|
||||
+ HDMI_QUANTIZATION_RANGE_FULL;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ vc4_hdmi_write_infoframe(encoder, &frame);
|
||||
+}
|
||||
+
|
||||
+static void vc4_hdmi_set_spd_infoframe(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ union hdmi_infoframe frame;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = hdmi_spd_infoframe_init(&frame.spd, "Broadcom", "Videocore");
|
||||
+ if (ret < 0) {
|
||||
+ DRM_ERROR("couldn't fill SPD infoframe\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ frame.spd.sdi = HDMI_SPD_SDI_PC;
|
||||
+
|
||||
+ vc4_hdmi_write_infoframe(encoder, &frame);
|
||||
+}
|
||||
+
|
||||
+static void vc4_hdmi_set_infoframes(struct drm_encoder *encoder)
|
||||
+{
|
||||
+ vc4_hdmi_set_avi_infoframe(encoder);
|
||||
+ vc4_hdmi_set_spd_infoframe(encoder);
|
||||
+}
|
||||
+
|
||||
static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
struct drm_display_mode *unadjusted_mode,
|
||||
struct drm_display_mode *mode)
|
||||
@@ -336,8 +455,9 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
|
||||
if (vc4_encoder->hdmi_monitor && drm_match_cea_mode(mode) > 1) {
|
||||
/* CEA VICs other than #1 requre limited range RGB
|
||||
- * output. Apply a colorspace conversion to squash
|
||||
- * 0-255 down to 16-235. The matrix here is:
|
||||
+ * output unless overridden by an AVI infoframe.
|
||||
+ * Apply a colorspace conversion to squash 0-255 down
|
||||
+ * to 16-235. The matrix here is:
|
||||
*
|
||||
* [ 0 0 0.8594 16]
|
||||
* [ 0 0.8594 0 16]
|
||||
@@ -355,6 +475,9 @@ static void vc4_hdmi_encoder_mode_set(struct drm_encoder *encoder,
|
||||
HD_WRITE(VC4_HD_CSC_24_23, (0x100 << 16) | 0x000);
|
||||
HD_WRITE(VC4_HD_CSC_32_31, (0x000 << 16) | 0x6e0);
|
||||
HD_WRITE(VC4_HD_CSC_34_33, (0x100 << 16) | 0x000);
|
||||
+ vc4_encoder->limited_rgb_range = true;
|
||||
+ } else {
|
||||
+ vc4_encoder->limited_rgb_range = false;
|
||||
}
|
||||
|
||||
/* The RGB order applies even when CSC is disabled. */
|
||||
@@ -373,6 +496,8 @@ static void vc4_hdmi_encoder_disable(struct drm_encoder *encoder)
|
||||
struct drm_device *dev = encoder->dev;
|
||||
struct vc4_dev *vc4 = to_vc4_dev(dev);
|
||||
|
||||
+ HDMI_WRITE(VC4_HDMI_RAM_PACKET_CONFIG, 0);
|
||||
+
|
||||
HDMI_WRITE(VC4_HDMI_TX_PHY_RESET_CTL, 0xf << 16);
|
||||
HD_WRITE(VC4_HD_VID_CTL,
|
||||
HD_READ(VC4_HD_VID_CTL) & ~VC4_HD_VID_CTL_ENABLE);
|
||||
@@ -425,9 +550,10 @@ static void vc4_hdmi_encoder_enable(struct drm_encoder *encoder)
|
||||
HDMI_READ(VC4_HDMI_SCHEDULER_CONTROL) |
|
||||
VC4_HDMI_SCHEDULER_CONTROL_VERT_ALWAYS_KEEPOUT);
|
||||
|
||||
- /* XXX: Set HDMI_RAM_PACKET_CONFIG (1 << 16) and set
|
||||
- * up the infoframe.
|
||||
- */
|
||||
+ HDMI_WRITE(VC4_HDMI_RAM_PACKET_CONFIG,
|
||||
+ VC4_HDMI_RAM_PACKET_ENABLE);
|
||||
+
|
||||
+ vc4_hdmi_set_infoframes(encoder);
|
||||
|
||||
drift = HDMI_READ(VC4_HDMI_FIFO_CTL);
|
||||
drift &= VC4_HDMI_FIFO_VALID_WRITE_MASK;
|
||||
diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
index 9ecd6ff..a4b5370 100644
|
||||
--- a/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
+++ b/drivers/gpu/drm/vc4/vc4_regs.h
|
||||
@@ -438,6 +438,8 @@
|
||||
#define VC4_HDMI_RAM_PACKET_CONFIG 0x0a0
|
||||
# define VC4_HDMI_RAM_PACKET_ENABLE BIT(16)
|
||||
|
||||
+#define VC4_HDMI_RAM_PACKET_STATUS 0x0a4
|
||||
+
|
||||
#define VC4_HDMI_HORZA 0x0c4
|
||||
# define VC4_HDMI_HORZA_VPOS BIT(14)
|
||||
# define VC4_HDMI_HORZA_HPOS BIT(13)
|
||||
@@ -499,6 +501,9 @@
|
||||
|
||||
#define VC4_HDMI_TX_PHY_RESET_CTL 0x2c0
|
||||
|
||||
+#define VC4_HDMI_GCP_0 0x400
|
||||
+#define VC4_HDMI_PACKET_STRIDE 0x24
|
||||
+
|
||||
#define VC4_HD_M_CTL 0x00c
|
||||
# define VC4_HD_M_REGISTER_FILE_STANDBY (3 << 6)
|
||||
# define VC4_HD_M_RAM_STANDBY (3 << 4)
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -19,11 +19,13 @@ CONFIG_CC_STACKPROTECTOR=y
|
|||
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
# CONFIG_BIG_LITTLE is not set
|
||||
# CONFIG_ARM_BIG_LITTLE_CPUIDLE is not set
|
||||
# CONFIG_IWMMXT is not set
|
||||
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
# CONFIG_PWM_FSL_FTM is not set
|
||||
# https://fedoraproject.org/wiki/Features/Checkpoint_Restore
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RESET_GPIO=y
|
||||
|
@ -35,7 +37,6 @@ CONFIG_INPUT_PWM_BEEPER=m
|
|||
CONFIG_ARM_SP805_WATCHDOG=m
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
CONFIG_NR_CPUS=8
|
||||
|
||||
CONFIG_SWIOTLB=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
|
@ -74,6 +75,7 @@ CONFIG_GPIO_PL061=y
|
|||
CONFIG_USB_ISP1760=m
|
||||
CONFIG_ARM_PL172_MPMC=m
|
||||
CONFIG_DRM_HDLCD=m
|
||||
CONFIG_DRM_MALI_DISPLAY=m
|
||||
# CONFIG_DRM_HDLCD_SHOW_UNDERRUN is not set
|
||||
|
||||
# HW crypto and rng
|
||||
|
@ -116,6 +118,51 @@ CONFIG_CLKSRC_VERSATILE=y
|
|||
CONFIG_POWER_RESET_VERSATILE=y
|
||||
# CONFIG_ARM_CHARLCD is not set
|
||||
|
||||
# Broadcom
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
# CONFIG_ARCH_BCM_CYGNUS is not set
|
||||
# CONFIG_ARCH_BCM_NSP is not set
|
||||
# CONFIG_ARCH_BCM_5301X is not set
|
||||
# CONFIG_ARCH_BCM_281XX is not set
|
||||
# CONFIG_ARCH_BCM_21664 is not set
|
||||
# CONFIG_ARCH_BCM_63XX is not set
|
||||
# CONFIG_ARCH_BRCMSTB is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# CONFIG_ARCH_BCM_CYGNUS is not set
|
||||
# CONFIG_ARCH_BCM_NSP is not set
|
||||
# CONFIG_ARCH_BCM_5301X is not set
|
||||
# CONFIG_ARCH_BCM_281XX is not set
|
||||
# CONFIG_ARCH_BCM_21664 is not set
|
||||
# CONFIG_ARCH_BCM_63XX is not set
|
||||
# CONFIG_ARCH_BCM_23550 is not set
|
||||
# CONFIG_ARCH_BRCMSTB is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# BCM 283x
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
CONFIG_DMA_BCM2835=m
|
||||
CONFIG_MMC_SDHCI_IPROC=m
|
||||
CONFIG_MMC_BCM2835_SDHOST=m
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_PWM_BCM2835=m
|
||||
CONFIG_HW_RANDOM_BCM2835=m
|
||||
CONFIG_I2C_BCM2835=m
|
||||
CONFIG_SPI_BCM2835=m
|
||||
CONFIG_SPI_BCM2835AUX=m
|
||||
CONFIG_BCM2835_WDT=m
|
||||
CONFIG_SND_BCM2835_SOC_I2S=m
|
||||
CONFIG_DRM_VC4=m
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
# popular digital audio HATs
|
||||
CONFIG_SND_SOC_PCM512x=m
|
||||
CONFIG_SND_SOC_PCM512x_I2C=m
|
||||
CONFIG_SND_SOC_PCM512x_SPI=m
|
||||
CONFIG_SND_SOC_TPA6130A2=m
|
||||
CONFIG_SND_SOC_WM8804=m
|
||||
CONFIG_SND_SOC_WM8804_I2C=m
|
||||
CONFIG_SND_SOC_WM8804_SPI=m
|
||||
|
||||
# Marvell EBU
|
||||
CONFIG_ARCH_MVEBU=y
|
||||
CONFIG_SERIAL_MVEBU_UART=y
|
||||
|
@ -150,6 +197,7 @@ CONFIG_PHY_MVEBU_SATA=y
|
|||
CONFIG_AHCI_MVEBU=m
|
||||
# CONFIG_CACHE_FEROCEON_L2 is not set
|
||||
# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
|
||||
# CONFIG_PCI_AARDVARK is not set
|
||||
|
||||
# Rockchips
|
||||
CONFIG_ARCH_ROCKCHIP=y
|
||||
|
@ -158,7 +206,7 @@ CONFIG_SPI_ROCKCHIP=m
|
|||
CONFIG_PWM_ROCKCHIP=m
|
||||
CONFIG_ROCKCHIP_SARADC=m
|
||||
CONFIG_ROCKCHIP_IODOMAIN=m
|
||||
CONFIG_MMC_DW_ROCKCHIP=m
|
||||
CONFIG_MMC_DW_ROCKCHIP=y
|
||||
CONFIG_EMAC_ROCKCHIP=m
|
||||
CONFIG_MFD_RK808=m
|
||||
CONFIG_COMMON_CLK_RK808=m
|
||||
|
@ -201,6 +249,7 @@ CONFIG_PCI_TEGRA=y
|
|||
CONFIG_AHCI_TEGRA=m
|
||||
CONFIG_MMC_SDHCI_TEGRA=m
|
||||
CONFIG_TEGRA_WATCHDOG=m
|
||||
CONFIG_GPIO_TEGRA=y
|
||||
CONFIG_I2C_TEGRA=m
|
||||
CONFIG_SPI_TEGRA114=m
|
||||
CONFIG_PWM_TEGRA=m
|
||||
|
@ -257,7 +306,6 @@ CONFIG_CLOCK_THERMAL=y
|
|||
CONFIG_CPUFREQ_DT=m
|
||||
CONFIG_CPUFREQ_DT_PLATDEV=y
|
||||
CONFIG_DEVFREQ_THERMAL=y
|
||||
# CONFIG_ARM_CPUIDLE is not set
|
||||
# CONFIG_ARM_DT_BL_CPUFREQ is not set
|
||||
# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set
|
||||
CONFIG_SPMI=m
|
||||
|
@ -282,7 +330,6 @@ CONFIG_OF_OVERLAY=y
|
|||
CONFIG_OF_PCI_IRQ=m
|
||||
CONFIG_OF_PCI=m
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
# CONFIG_PCIE_IPROC is not set
|
||||
CONFIG_OF_RESERVED_MEM=y
|
||||
CONFIG_OF_RESOLVE=y
|
||||
CONFIG_PM_GENERIC_DOMAINS_OF=y
|
||||
|
@ -299,6 +346,7 @@ CONFIG_MAILBOX=y
|
|||
CONFIG_ARM_MHU=m
|
||||
# CONFIG_PL320_MBOX is not set
|
||||
CONFIG_ARM_SCPI_PROTOCOL=m
|
||||
CONFIG_ARM_SCPI_POWER_DOMAIN=m
|
||||
|
||||
# NVMem
|
||||
CONFIG_NVMEM=m
|
||||
|
@ -397,16 +445,15 @@ CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0=m
|
|||
|
||||
# Designware (used by numerous devices)
|
||||
CONFIG_MMC_DW=m
|
||||
CONFIG_MMC_DW_PLTFM=m
|
||||
CONFIG_MMC_DW_K3=m
|
||||
CONFIG_MMC_DW_PCI=m
|
||||
CONFIG_MMC_DW_PLTFM=y
|
||||
CONFIG_MMC_DW_K3=y
|
||||
CONFIG_MMC_DW_PCI=y
|
||||
CONFIG_SPI_DW_MMIO=m
|
||||
CONFIG_SPI_DW_PCI=m
|
||||
# CONFIG_SPI_DW_MID_DMA is not set
|
||||
# CONFIG_MMC_QCOM_DML is not set
|
||||
CONFIG_USB_DWC2=m
|
||||
CONFIG_USB_DWC2_DUAL_ROLE=y
|
||||
CONFIG_USB_DWC2_PLATFORM=m
|
||||
CONFIG_USB_DWC2_PCI=m
|
||||
# CONFIG_USB_DWC2_DEBUG is not set
|
||||
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
|
||||
|
@ -494,6 +541,12 @@ CONFIG_SPI_PL022=m
|
|||
CONFIG_SENSORS_IIO_HWMON=m
|
||||
CONFIG_IIO_SYSFS_TRIGGER=m
|
||||
CONFIG_SENSORS_ARM_SCPI=m
|
||||
CONFIG_IIO_ST_PRESS=m
|
||||
CONFIG_IIO_ST_PRESS_I2C=m
|
||||
CONFIG_IIO_ST_PRESS_SPI=m
|
||||
CONFIG_TMP006=m
|
||||
CONFIG_BMP280=m
|
||||
CONFIG_TCS3472=m
|
||||
|
||||
# PHY framework
|
||||
CONFIG_GENERIC_PHY=y
|
||||
|
@ -509,7 +562,7 @@ CONFIG_CMA=y
|
|||
CONFIG_DMA_CMA=y
|
||||
# CONFIG_CMA_DEBUG is not set
|
||||
CONFIG_CMA_DEBUGFS=y
|
||||
CONFIG_CMA_SIZE_MBYTES=16
|
||||
CONFIG_CMA_SIZE_MBYTES=64
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
|
||||
# CONFIG_CMA_SIZE_SEL_MIN is not set
|
||||
|
@ -517,11 +570,6 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
|
|||
CONFIG_CMA_ALIGNMENT=8
|
||||
CONFIG_CMA_AREAS=7
|
||||
|
||||
# EDAC
|
||||
CONFIG_EDAC=y
|
||||
CONFIG_EDAC_MM_EDAC=m
|
||||
CONFIG_EDAC_LEGACY_SYSFS=y
|
||||
|
||||
# VFIO
|
||||
CONFIG_VFIO_PLATFORM=m
|
||||
CONFIG_VFIO_AMBA=m
|
||||
|
@ -541,8 +589,6 @@ CONFIG_VFIO_AMBA=m
|
|||
# CONFIG_CADENCE_WATCHDOG is not set
|
||||
|
||||
# CONFIG_DRM_ARMADA is not set
|
||||
# CONFIG_DRM_TEGRA is not set
|
||||
# CONFIG_SHMOBILE_IOMMU is not set
|
||||
|
||||
# CONFIG_COMMON_CLK_SI570 is not set
|
||||
# CONFIG_COMMON_CLK_QCOM is not set
|
||||
|
@ -551,7 +597,6 @@ CONFIG_COMMON_CLK_SCPI=m
|
|||
# CONFIG_ARM_PTDUMP is not set
|
||||
|
||||
# CONFIG_PATA_PLATFORM is not set
|
||||
# CONFIG_USB_ULPI is not set
|
||||
# CONFIG_KEYBOARD_OMAP4 is not set
|
||||
# CONFIG_KEYBOARD_BCM is not set
|
||||
# CONFIG_PHY_SAMSUNG_USB2 is not set
|
||||
|
@ -561,7 +606,6 @@ CONFIG_COMMON_CLK_SCPI=m
|
|||
|
||||
# core
|
||||
|
||||
# CONFIG_INFINIBAND is not set
|
||||
# CONFIG_ISDN is not set
|
||||
# CONFIG_PCMCIA is not set
|
||||
# CONFIG_PARPORT is not set
|
||||
|
@ -583,7 +627,6 @@ CONFIG_NET_VENDOR_MELLANOX=y
|
|||
# CONFIG_NET_VENDOR_DEC is not set
|
||||
# CONFIG_NET_VENDOR_EMULEX is not set
|
||||
# CONFIG_NET_VENDOR_EXAR is not set
|
||||
# CONFIG_NET_VENDOR_MELLANOX is not set
|
||||
# CONFIG_NET_VENDOR_QLOGIC is not set
|
||||
# CONFIG_NET_VENDOR_SUN is not set
|
||||
# CONFIG_NET_VENDOR_WIZNET is not set
|
||||
|
@ -597,8 +640,6 @@ CONFIG_NET_VENDOR_MELLANOX=y
|
|||
# CONFIG_SCSI_3W_SAS is not set
|
||||
# CONFIG_SCSI_PM8001 is not set
|
||||
# CONFIG_SCSI_IPS is not set
|
||||
# CONFIG_SCSI_CXGB3_ISCSI is not set
|
||||
# CONFIG_SCSI_CXGB4_ISCSI is not set
|
||||
# CONFIG_SCSI_BFA_FC is not set
|
||||
# CONFIG_FUSION is not set
|
||||
# CONFIG_SCSI_3W_9XXX is not set
|
||||
|
@ -645,26 +686,20 @@ CONFIG_NET_VENDOR_MELLANOX=y
|
|||
|
||||
# drm
|
||||
# CONFIG_DRM_VMWGFX is not set
|
||||
# CONFIG_DRM_MSM_DSI is not set
|
||||
# CONFIG_IMX_IPUV3_CORE is not set
|
||||
# CONFIG_FB_DA8XX is not set
|
||||
|
||||
# CONFIG_DEBUG_SET_MODULE_RONX is not set
|
||||
# CONFIG_CORESIGHT is not set
|
||||
|
||||
# CONFIG_LATTICE_ECP3_CONFIG is not set
|
||||
# CONFIG_BMP085_SPI is not set
|
||||
# CONFIG_TI_DAC7512 is not set
|
||||
|
||||
# https://fedoraproject.org/wiki/Features/Checkpoint_Restore
|
||||
CONFIG_CHECKPOINT_RESTORE=y
|
||||
|
||||
# Bad Intel shit we don't care about
|
||||
# CONFIG_PINCTRL_BAYTRAIL is not set
|
||||
# CONFIG_PINCTRL_CHERRYVIEW is not set
|
||||
# CONFIG_PINCTRL_BROXTON is not set
|
||||
# CONFIG_PINCTRL_SUNRISEPOINT is not set
|
||||
# CONFIG_XILINX_ZYNQMP_DMA is not set
|
||||
|
||||
# CONFIG_HW_RANDOM_HISI is not set
|
||||
# CONFIG_HISILICON_IRQ_MBIGEN is not set
|
||||
# CONFIG_QRTR is not set
|
||||
|
||||
|
|
52
config-arm64
52
config-arm64
|
@ -8,6 +8,7 @@ CONFIG_ARCH_SEATTLE=y
|
|||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_ARCH_XGENE=y
|
||||
CONFIG_ARCH_THUNDER=y
|
||||
# CONFIG_ARCH_ALPINE is not set
|
||||
# CONFIG_ARCH_BCM_IPROC is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
|
@ -18,7 +19,6 @@ CONFIG_ARCH_XGENE=y
|
|||
# CONFIG_ARCH_RENESAS is not set
|
||||
# CONFIG_ARCH_SPRD is not set
|
||||
# CONFIG_ARCH_STRATIX10 is not set
|
||||
# CONFIG_ARCH_THUNDER is not set
|
||||
# CONFIG_ARCH_VULCAN is not set
|
||||
# CONFIG_ARCH_ZYNQMP is not set
|
||||
# CONFIG_ARCH_UNIPHIER is not set
|
||||
|
@ -33,6 +33,7 @@ CONFIG_ARM64_ERRATUM_832075=y
|
|||
CONFIG_ARM64_ERRATUM_843419=y
|
||||
CONFIG_ARM64_ERRATUM_834220=y
|
||||
CONFIG_CAVIUM_ERRATUM_22375=y
|
||||
CONFIG_CAVIUM_ERRATUM_23144=y
|
||||
CONFIG_CAVIUM_ERRATUM_23154=y
|
||||
CONFIG_CAVIUM_ERRATUM_27456=y
|
||||
|
||||
|
@ -41,6 +42,7 @@ CONFIG_CAVIUM_ERRATUM_27456=y
|
|||
# CONFIG_SERIAL_AMBA_PL010 is not set
|
||||
# CONFIG_AMBA_PL08X is not set
|
||||
CONFIG_ARM_SMMU_V3=y
|
||||
CONFIG_NR_CPUS=256
|
||||
|
||||
CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
|
@ -104,6 +106,18 @@ CONFIG_ACPI_PROCESSOR=y
|
|||
CONFIG_ACPI_THERMAL=y
|
||||
CONFIG_I2C_SCMI=m
|
||||
CONFIG_SENSORS_ACPI_POWER=m
|
||||
CONFIG_ACPI_TABLE_UPGRADE=y
|
||||
CONFIG_ACPI_CONFIGFS=m
|
||||
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_ACPI_NUMA=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
||||
CONFIG_NODES_SHIFT=9
|
||||
|
||||
CONFIG_DMI=y
|
||||
CONFIG_DMIID=y
|
||||
CONFIG_DMI_SYSFS=y
|
||||
|
||||
CONFIG_ARM64_CRYPTO=y
|
||||
CONFIG_CRYPTO_SHA1_ARM64_CE=y
|
||||
|
@ -134,6 +148,7 @@ CONFIG_PCI_XGENE=y
|
|||
CONFIG_PCI_XGENE_MSI=y
|
||||
CONFIG_I2C_XGENE_SLIMPRO=m
|
||||
CONFIG_XGENE_SLIMPRO_MBOX=m
|
||||
CONFIG_MDIO_XGENE=m
|
||||
|
||||
# AMD Seattle
|
||||
CONFIG_NET_SB1000=y
|
||||
|
@ -148,6 +163,7 @@ CONFIG_COMMON_CLK_HI6220=y
|
|||
CONFIG_PCI_HISI=y
|
||||
CONFIG_POWER_RESET_HISI=y
|
||||
CONFIG_HISI_THERMAL=m
|
||||
CONFIG_HW_RANDOM_HISI=m
|
||||
CONFIG_STUB_CLK_HI6220=y
|
||||
CONFIG_REGULATOR_HI655X=m
|
||||
CONFIG_PHY_HI6220_USB=m
|
||||
|
@ -157,14 +173,18 @@ CONFIG_RESET_HISI=y
|
|||
CONFIG_MFD_HI655X_PMIC=m
|
||||
CONFIG_DRM_HISI_KIRIN=m
|
||||
CONFIG_HISI_KIRIN_DW_DSI=m
|
||||
CONFIG_MDIO_HISI_FEMAC=m
|
||||
CONFIG_INPUT_HISI_POWERKEY=m
|
||||
|
||||
# Tegra
|
||||
CONFIG_ARCH_TEGRA_132_SOC=y
|
||||
CONFIG_ARCH_TEGRA_210_SOC=y
|
||||
CONFIG_TEGRA210_ADMA=y
|
||||
CONFIG_MFD_MAX77620=y
|
||||
CONFIG_PINCTRL_MAX77620=m
|
||||
CONFIG_REGULATOR_MAX77620=m
|
||||
# CONFIG_GPIO_TEGRA is not set
|
||||
CONFIG_GPIO_MAX77620=m
|
||||
CONFIG_TEGRA_ACONNECT=y
|
||||
|
||||
# AllWinner
|
||||
CONFIG_MACH_SUN50I=y
|
||||
|
@ -172,6 +192,7 @@ CONFIG_SUNXI_RSB=m
|
|||
CONFIG_AHCI_SUNXI=m
|
||||
CONFIG_NET_VENDOR_ALLWINNER=y
|
||||
# CONFIG_SUN4I_EMAC is not set
|
||||
CONFIG_SUN8I_EMAC=m
|
||||
# CONFIG_MDIO_SUN4I is not set
|
||||
# CONFIG_KEYBOARD_SUN4I_LRADC is not set
|
||||
# CONFIG_TOUCHSCREEN_SUN4I is not set
|
||||
|
@ -185,6 +206,8 @@ CONFIG_PWM_SUN4I=m
|
|||
# CONFIG_PHY_SUN4I_USB is not set
|
||||
# CONFIG_PHY_SUN9I_USB is not set
|
||||
CONFIG_NVMEM_SUNXI_SID=m
|
||||
CONFIG_SUNXI_CCU=y
|
||||
# CONFIG_SUN8I_H3_CCU is not set
|
||||
|
||||
# qcom
|
||||
# MSM8996 = SD-820, MSM8916 = SD-410
|
||||
|
@ -239,22 +262,28 @@ CONFIG_QCOM_COINCELL=m
|
|||
# CONFIG_PINCTRL_APQ8084 is not set
|
||||
# CONFIG_PINCTRL_MSM8660 is not set
|
||||
# CONFIG_PINCTRL_MSM8960 is not set
|
||||
# CONFIG_PINCTRL_MDM9615 is not set
|
||||
# CONFIG_PINCTRL_MSM8X74 is not set
|
||||
# CONFIG_PINCTRL_QDF2XXX is not set
|
||||
# CONFIG_INPUT_PM8941_PWRKEY is not set
|
||||
# CONFIG_INPUT_REGULATOR_HAPTIC is not set
|
||||
# CONFIG_CHARGER_MANAGER is not set
|
||||
# CONFIG_SENSORS_LTC2978_REGULATOR is not set
|
||||
# CONFIG_QCOM_Q6V5_PIL is not set
|
||||
|
||||
# mvebu
|
||||
# CONFIG_MV_XOR_V2 is not set
|
||||
|
||||
# ThunderX
|
||||
# CONFIG_MDIO_OCTEON is not set
|
||||
# CONFIG_MDIO_THUNDER is not set
|
||||
# CONFIG_PCI_HOST_THUNDER_PEM is not set
|
||||
# CONFIG_PCI_HOST_THUNDER_ECAM is not set
|
||||
|
||||
CONFIG_DMI=y
|
||||
CONFIG_DMIID=y
|
||||
CONFIG_DMI_SYSFS=y
|
||||
CONFIG_MDIO_THUNDER=m
|
||||
CONFIG_PCI_HOST_THUNDER_PEM=y
|
||||
CONFIG_PCI_HOST_THUNDER_ECAM=y
|
||||
CONFIG_NET_VENDOR_CAVIUM=y
|
||||
CONFIG_THUNDER_NIC_PF=m
|
||||
CONFIG_THUNDER_NIC_VF=m
|
||||
CONFIG_THUNDER_NIC_BGX=m
|
||||
# CONFIG_LIQUIDIO is not set
|
||||
|
||||
CONFIG_SATA_AHCI_PLATFORM=y
|
||||
CONFIG_SATA_AHCI_SEATTLE=m
|
||||
|
@ -286,7 +315,4 @@ CONFIG_DEBUG_SECTION_MISMATCH=y
|
|||
# CONFIG_FUJITSU_ES is not set
|
||||
# CONFIG_IMX_THERMAL is not set
|
||||
# CONFIG_PNP_DEBUG_MESSAGES is not set
|
||||
|
||||
# Will probably need to be changed later
|
||||
# CONFIG_NUMA is not set
|
||||
|
||||
# CONFIG_BCM_PDC_MBOX is not set
|
||||
|
|
43
config-armv7
43
config-armv7
|
@ -9,6 +9,7 @@ CONFIG_ARCH_OMAP4=y
|
|||
CONFIG_ARCH_QCOM=y
|
||||
CONFIG_ARCH_TEGRA=y
|
||||
CONFIG_ARCH_ZYNQ=y
|
||||
# CONFIG_ARCH_MDM9615 is not set
|
||||
|
||||
# These are supported in the LPAE kernel
|
||||
# CONFIG_ARM_LPAE is not set
|
||||
|
@ -142,9 +143,11 @@ CONFIG_PWM_TIEHRPWM=m
|
|||
CONFIG_PWM_TWL=m
|
||||
CONFIG_PWM_TWL_LED=m
|
||||
CONFIG_PWM_OMAP_DMTIMER=m
|
||||
# CONFIG_PWM_STMPE is not set
|
||||
|
||||
CONFIG_CRYPTO_DEV_OMAP_SHAM=m
|
||||
CONFIG_CRYPTO_DEV_OMAP_AES=m
|
||||
# Disable for the moment, terribly broken upstream
|
||||
# CONFIG_CRYPTO_DEV_OMAP_AES is not set
|
||||
CONFIG_CRYPTO_DEV_OMAP_DES=m
|
||||
CONFIG_HW_RANDOM_OMAP=m
|
||||
CONFIG_HW_RANDOM_OMAP3_ROM=m
|
||||
|
@ -152,8 +155,20 @@ CONFIG_HW_RANDOM_OMAP3_ROM=m
|
|||
CONFIG_DRM_OMAP=m
|
||||
CONFIG_DRM_OMAP_NUM_CRTCS=2
|
||||
CONFIG_OMAP2_VRFB=y
|
||||
# CONFIG_FB_OMAP2 is not set
|
||||
# CONFIG_FB_DA8XX is not set
|
||||
CONFIG_DRM_OMAP_ENCODER_OPA362=m
|
||||
CONFIG_DRM_OMAP_ENCODER_TFP410=m
|
||||
CONFIG_DRM_OMAP_ENCODER_TPD12S015=m
|
||||
CONFIG_DRM_OMAP_CONNECTOR_DVI=m
|
||||
CONFIG_DRM_OMAP_CONNECTOR_HDMI=m
|
||||
CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV=m
|
||||
CONFIG_DRM_OMAP_PANEL_DPI=m
|
||||
CONFIG_DRM_OMAP_PANEL_DSI_CM=m
|
||||
CONFIG_DRM_OMAP_PANEL_SONY_ACX565AKM=m
|
||||
CONFIG_DRM_OMAP_PANEL_LGPHILIPS_LB035Q02=m
|
||||
CONFIG_DRM_OMAP_PANEL_SHARP_LS037V7DW01=m
|
||||
CONFIG_DRM_OMAP_PANEL_TPO_TD028TTEC1=m
|
||||
CONFIG_DRM_OMAP_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_DRM_OMAP_PANEL_NEC_NL8048HL11=m
|
||||
|
||||
CONFIG_OMAP2_DSS=m
|
||||
# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
|
||||
|
@ -166,21 +181,6 @@ CONFIG_OMAP2_DSS_DSI=y
|
|||
CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
|
||||
CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y
|
||||
|
||||
CONFIG_DISPLAY_ENCODER_OPA362=m
|
||||
CONFIG_DISPLAY_ENCODER_TFP410=m
|
||||
CONFIG_DISPLAY_ENCODER_TPD12S015=m
|
||||
CONFIG_DISPLAY_CONNECTOR_DVI=m
|
||||
CONFIG_DISPLAY_CONNECTOR_HDMI=m
|
||||
CONFIG_DISPLAY_CONNECTOR_ANALOG_TV=m
|
||||
CONFIG_DISPLAY_PANEL_DPI=m
|
||||
CONFIG_DISPLAY_PANEL_DSI_CM=m
|
||||
CONFIG_DISPLAY_PANEL_SONY_ACX565AKM=m
|
||||
CONFIG_DISPLAY_PANEL_LGPHILIPS_LB035Q02=m
|
||||
CONFIG_DISPLAY_PANEL_SHARP_LS037V7DW01=m
|
||||
CONFIG_DISPLAY_PANEL_TPO_TD043MTEA1=m
|
||||
CONFIG_DISPLAY_PANEL_NEC_NL8048HL11=m
|
||||
CONFIG_DISPLAY_PANEL_TPO_TD028TTEC1=m
|
||||
|
||||
# Enable V4L2 drivers for OMAP2+
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
# CONFIG_VIDEO_OMAP2_VOUT is not set
|
||||
|
@ -207,12 +207,12 @@ CONFIG_SND_SOC_TLV320AIC23_I2C=m
|
|||
CONFIG_SND_SOC_TLV320AIC23_SPI=m
|
||||
CONFIG_SND_SOC_TLV320AIC3X=m
|
||||
CONFIG_SND_SOC_TLV320AIC31XX=m
|
||||
CONFIG_SND_SOC_TPA6130A2=m
|
||||
CONFIG_SND_SOC_TWL4030=m
|
||||
CONFIG_SND_SOC_TWL6040=m
|
||||
CONFIG_RADIO_WL128X=m
|
||||
|
||||
CONFIG_OMAP_REMOTEPROC=m
|
||||
CONFIG_TI_SYSCON_RESET=m
|
||||
|
||||
# CONFIG_OMAP2_DSS_DEBUGFS is not set
|
||||
# CONFIG_OMAP_IOMMU_DEBUG is not set
|
||||
|
@ -349,6 +349,8 @@ CONFIG_QCOM_SMSM=y
|
|||
CONFIG_QCOM_SMP2P=m
|
||||
CONFIG_PCIE_QCOM=y
|
||||
CONFIG_MTD_NAND_QCOM=m
|
||||
# CONFIG_QCOM_Q6V5_PIL is not set
|
||||
# CONFIG_MSM_IOMMU is not set
|
||||
|
||||
# i.MX
|
||||
# CONFIG_MXC_DEBUG_BOARD is not set
|
||||
|
@ -412,6 +414,7 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD=8192
|
|||
CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=m
|
||||
CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=m
|
||||
# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
|
||||
# CONFIG_CRYPTO_DEV_MXS_DCP is not set
|
||||
# CONFIG_CRYPTO_DEV_MXC_SCC is not set
|
||||
|
@ -574,7 +577,7 @@ CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
|
|||
CONFIG_COMMON_CLK_AXI_CLKGEN=m
|
||||
CONFIG_COMMON_CLK_SI570=m
|
||||
CONFIG_COMMON_CLK_XLNX_CLKWZRD=m
|
||||
# CONFIG_ARM_ZYNQ_CPUIDLE is not set
|
||||
CONFIG_ARM_ZYNQ_CPUIDLE=y
|
||||
CONFIG_LATTICE_ECP3_CONFIG=m
|
||||
CONFIG_NET_VENDOR_XILINX=y
|
||||
CONFIG_XILINX_EMACLITE=m
|
||||
|
|
|
@ -35,6 +35,7 @@ CONFIG_IRQ_CROSSBAR=y
|
|||
CONFIG_IOMMU_IO_PGTABLE_LPAE=y
|
||||
CONFIG_CPU_SW_DOMAIN_PAN=y
|
||||
CONFIG_ARM_CPU_SUSPEND=y
|
||||
CONFIG_NR_CPUS=32
|
||||
|
||||
# CONFIG_MCPM is not set
|
||||
# CONFIG_OABI_COMPAT is not set
|
||||
|
@ -52,8 +53,6 @@ CONFIG_ARM_CPU_SUSPEND=y
|
|||
# CONFIG_DEBUG_ALIGN_RODATA is not set
|
||||
|
||||
# Platforms enabled/disabled globally on ARMv7
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM2835=y
|
||||
CONFIG_ARCH_EXYNOS=y
|
||||
CONFIG_ARCH_HIGHBANK=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
|
@ -61,22 +60,6 @@ CONFIG_ARCH_TEGRA=y
|
|||
CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
|
||||
CONFIG_ARCH_VIRT=y
|
||||
# CONFIG_ARCH_ARTPEC is not set
|
||||
# CONFIG_ARCH_BCM_CYGNUS is not set
|
||||
# CONFIG_ARCH_BCM_NSP is not set
|
||||
# CONFIG_ARCH_BCM_5301X is not set
|
||||
# CONFIG_ARCH_BCM_281XX is not set
|
||||
# CONFIG_ARCH_BCM_21664 is not set
|
||||
# CONFIG_ARCH_BCM_63XX is not set
|
||||
# CONFIG_ARCH_BRCMSTB is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# CONFIG_ARCH_BCM_CYGNUS is not set
|
||||
# CONFIG_ARCH_BCM_NSP is not set
|
||||
# CONFIG_ARCH_BCM_5301X is not set
|
||||
# CONFIG_ARCH_BCM_281XX is not set
|
||||
# CONFIG_ARCH_BCM_21664 is not set
|
||||
# CONFIG_ARCH_BCM_63XX is not set
|
||||
# CONFIG_ARCH_BRCMSTB is not set
|
||||
# CONFIG_ARCH_BERLIN is not set
|
||||
# CONFIG_ARCH_HI3xxx is not set
|
||||
# CONFIG_ARCH_HISI is not set
|
||||
# CONFIG_ARCH_MEDIATEK is not set
|
||||
|
@ -128,9 +111,14 @@ CONFIG_ARM_ERRATA_775420=y
|
|||
CONFIG_PL310_ERRATA_753970=y
|
||||
CONFIG_PL310_ERRATA_769419=y
|
||||
CONFIG_PJ4B_ERRATA_4742=y
|
||||
# Cortex-A15
|
||||
# CONFIG_ARM_ERRATA_798181 is not set
|
||||
# CONFIG_ARM_ERRATA_773022 is not set
|
||||
# Cortex-A12/15/17
|
||||
CONFIG_ARM_ERRATA_798181=y
|
||||
CONFIG_ARM_ERRATA_773022=y
|
||||
CONFIG_ARM_ERRATA_818325_852422=y
|
||||
CONFIG_ARM_ERRATA_821420=y
|
||||
CONFIG_ARM_ERRATA_825619=y
|
||||
CONFIG_ARM_ERRATA_852421=y
|
||||
CONFIG_ARM_ERRATA_852423=y
|
||||
|
||||
# generic that deviates from or should be merged into config-generic
|
||||
CONFIG_SMP_ON_UP=y
|
||||
|
@ -158,6 +146,17 @@ CONFIG_LSM_MMAP_MIN_ADDR=32768
|
|||
|
||||
CONFIG_LBDAF=y
|
||||
|
||||
# Little.BIG
|
||||
CONFIG_BIG_LITTLE=y
|
||||
CONFIG_BL_SWITCHER=y
|
||||
CONFIG_ARM_BIG_LITTLE_CPUFREQ=m
|
||||
CONFIG_ARM_SCPI_CPUFREQ=m
|
||||
CONFIG_ARCH_VEXPRESS_DCSCB=y
|
||||
CONFIG_ARCH_VEXPRESS_TC2_PM=y
|
||||
CONFIG_ARM_VEXPRESS_SPC_CPUFREQ=m
|
||||
CONFIG_ARM_BIG_LITTLE_CPUIDLE=y
|
||||
# CONFIG_BL_SWITCHER_DUMMY_IF is not set
|
||||
|
||||
# GRR, needed for MFD_AS3722
|
||||
CONFIG_I2C=y
|
||||
|
||||
|
@ -190,8 +189,9 @@ CONFIG_VFIO_PLATFORM_CALXEDAXGMAC_RESET=m
|
|||
CONFIG_MACH_SUN6I=y
|
||||
CONFIG_MACH_SUN7I=y
|
||||
CONFIG_MACH_SUN8I=y
|
||||
# CONFIG_MACH_SUN9I is not set
|
||||
# CONFIG_MACH_SUN50I is not set
|
||||
CONFIG_MACH_SUN9I=y
|
||||
CONFIG_SUNXI_CCU=y
|
||||
CONFIG_SUN8I_H3_CCU=y
|
||||
CONFIG_SUNXI_SRAM=y
|
||||
CONFIG_DMA_SUN4I=m
|
||||
CONFIG_DMA_SUN6I=m
|
||||
|
@ -200,7 +200,7 @@ CONFIG_SUNXI_WATCHDOG=m
|
|||
CONFIG_NET_VENDOR_ALLWINNER=y
|
||||
CONFIG_RTC_DRV_SUNXI=m
|
||||
CONFIG_PHY_SUN4I_USB=m
|
||||
# CONFIG_PHY_SUN9I_USB is not set
|
||||
CONFIG_PHY_SUN9I_USB=m
|
||||
CONFIG_AHCI_SUNXI=m
|
||||
CONFIG_SPI_SUN4I=m
|
||||
CONFIG_SPI_SUN6I=m
|
||||
|
@ -223,6 +223,7 @@ CONFIG_IR_SUNXI=m
|
|||
CONFIG_MDIO_SUN4I=m
|
||||
CONFIG_DWMAC_SUNXI=m
|
||||
CONFIG_SUN4I_EMAC=m
|
||||
CONFIG_SUN8I_EMAC=m
|
||||
CONFIG_RTC_DRV_SUN6I=m
|
||||
CONFIG_MTD_NAND_SUNXI=m
|
||||
CONFIG_SERIO_SUN4I_PS2=m
|
||||
|
@ -233,28 +234,10 @@ CONFIG_USB_MUSB_SUNXI=m
|
|||
CONFIG_CRYPTO_DEV_SUN4I_SS=m
|
||||
CONFIG_SND_SUN4I_CODEC=m
|
||||
CONFIG_SND_SUN4I_SPDIF=m
|
||||
CONFIG_SND_SUN4I_I2S=m
|
||||
CONFIG_SUNXI_RSB=m
|
||||
CONFIG_NVMEM_SUNXI_SID=m
|
||||
|
||||
# BCM 283x
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_BCM2835AUX=y
|
||||
CONFIG_DMA_BCM2835=m
|
||||
# CONFIG_MMC_SDHCI_BCM2835 is not set
|
||||
CONFIG_MMC_SDHCI_IPROC=m
|
||||
CONFIG_BCM2835_MBOX=y
|
||||
CONFIG_PWM_BCM2835=m
|
||||
CONFIG_HW_RANDOM_BCM2835=m
|
||||
CONFIG_I2C_BCM2835=m
|
||||
CONFIG_SPI_BCM2835=m
|
||||
CONFIG_SPI_BCM2835AUX=m
|
||||
CONFIG_BCM2835_WDT=m
|
||||
CONFIG_SND_BCM2835_SOC_I2S=m
|
||||
CONFIG_DRM_VC4=m
|
||||
CONFIG_RASPBERRYPI_FIRMWARE=y
|
||||
CONFIG_RASPBERRYPI_POWER=y
|
||||
|
||||
# Exynos
|
||||
CONFIG_ARCH_EXYNOS3=y
|
||||
# CONFIG_ARCH_EXYNOS4 is not set
|
||||
|
@ -269,7 +252,8 @@ CONFIG_SOC_EXYNOS5800=y
|
|||
CONFIG_SERIAL_SAMSUNG=y
|
||||
CONFIG_SERIAL_SAMSUNG_CONSOLE=y
|
||||
CONFIG_ARM_EXYNOS5440_CPUFREQ=m
|
||||
# CONFIG_ARM_EXYNOS_CPUIDLE is not set
|
||||
CONFIG_ARM_EXYNOS_CPUIDLE=y
|
||||
CONFIG_EXYNOS5420_MCPM=y
|
||||
CONFIG_ARM_EXYNOS5_BUS_DEVFREQ=m
|
||||
# CONFIG_ARM_EXYNOS_BUS_DEVFREQ is not set
|
||||
# CONFIG_EXYNOS5420_MCPM not set
|
||||
|
@ -283,7 +267,7 @@ CONFIG_EXYNOS_THERMAL=m
|
|||
CONFIG_EXYNOS_ADC=m
|
||||
CONFIG_MMC_SDHCI_S3C=m
|
||||
CONFIG_MMC_SDHCI_S3C_DMA=y
|
||||
CONFIG_MMC_DW_EXYNOS=m
|
||||
CONFIG_MMC_DW_EXYNOS=y
|
||||
# CONFIG_EXYNOS_IOMMU is not set
|
||||
CONFIG_PCI_EXYNOS=y
|
||||
CONFIG_PHY_EXYNOS5_USBDRD=m
|
||||
|
@ -347,6 +331,7 @@ CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994=m
|
|||
CONFIG_SND_SOC_SMDK_WM8994_PCM=m
|
||||
CONFIG_SND_SOC_SNOW=m
|
||||
CONFIG_SND_SOC_ODROIDX2=m
|
||||
CONFIG_EXYNOS_AUDSS_CLK_CON=m
|
||||
# CONFIG_EXYNOS_IOMMU_DEBUG is not set
|
||||
# CONFIG_SAMSUNG_PM_DEBUG is not set
|
||||
# CONFIG_SAMSUNG_PM_CHECK is not set
|
||||
|
@ -379,7 +364,6 @@ CONFIG_SND_SOC_TEGRA_RT5677=m
|
|||
CONFIG_AD525X_DPOT=m
|
||||
CONFIG_AD525X_DPOT_I2C=m
|
||||
CONFIG_AD525X_DPOT_SPI=m
|
||||
# CONFIG_GPIO_TEGRA is not set
|
||||
|
||||
# Jetson TK1
|
||||
CONFIG_PINCTRL_AS3722=y
|
||||
|
@ -405,7 +389,7 @@ CONFIG_MACH_DOVE=y
|
|||
CONFIG_CACHE_TAUROS2=y
|
||||
CONFIG_PINCTRL_ARMADA_370=y
|
||||
CONFIG_PINCTRL_ARMADA_XP=y
|
||||
# CONFIG_ARM_MVEBU_V7_CPUIDLE is not set
|
||||
CONFIG_ARM_MVEBU_V7_CPUIDLE=y
|
||||
CONFIG_PINCTRL_DOVE=y
|
||||
CONFIG_MMC_SDHCI_DOVE=m
|
||||
CONFIG_DOVE_THERMAL=m
|
||||
|
@ -475,6 +459,7 @@ CONFIG_MFD_TPS65912_SPI=y
|
|||
# CONFIG_PINCTRL_APQ8084 is not set
|
||||
# CONFIG_PINCTRL_MSM8960 is not set
|
||||
# CONFIG_PINCTRL_MSM8660 is not set
|
||||
# CONFIG_PINCTRL_MDM9615 is not set
|
||||
# CONFIG_PINCTRL_MSM8996 is not set
|
||||
|
||||
# GPIO
|
||||
|
@ -528,6 +513,7 @@ CONFIG_MTD_NAND_PXA3xx=m
|
|||
CONFIG_MTD_NAND_RICOH=m
|
||||
CONFIG_MTD_NAND_TMIO=m
|
||||
# CONFIG_MTD_NAND_BRCMNAND is not set
|
||||
# CONFIG_MTD_NAND_MTK is not set
|
||||
# CONFIG_MTD_MT81xx_NOR is not set
|
||||
CONFIG_MTD_SPI_NOR=m
|
||||
# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
|
||||
|
@ -608,11 +594,6 @@ CONFIG_GENERIC_ADC_BATTERY=m
|
|||
CONFIG_BATTERY_SBS=m
|
||||
|
||||
# Sensors
|
||||
CONFIG_TMP006=m
|
||||
CONFIG_BMP085=y
|
||||
CONFIG_BMP085_I2C=m
|
||||
CONFIG_BMP085_SPI=m
|
||||
CONFIG_BMP280=m
|
||||
CONFIG_SENSORS_AD7314=m
|
||||
CONFIG_SENSORS_ADCXX=m
|
||||
CONFIG_SENSORS_ADS7871=m
|
||||
|
@ -704,6 +685,7 @@ CONFIG_I2C_CROS_EC_TUNNEL=m
|
|||
CONFIG_SND_SOC_TS3A227E=m
|
||||
CONFIG_CROS_EC_CHARDEV=m
|
||||
CONFIG_CROS_EC_PROTO=y
|
||||
CONFIG_PWM_CROS_EC=m
|
||||
|
||||
# This newly introduced mess needs to be fixed upstream :-(
|
||||
CONFIG_STMMAC_PLATFORM=m
|
||||
|
@ -721,6 +703,7 @@ CONFIG_R8188EU=m
|
|||
# CONFIG_CAN_TI_HECC is not set
|
||||
# CONFIG_CAN_FLEXCAN is not set
|
||||
# CONFIG_CAN_RCAR is not set
|
||||
# CONFIG_CAN_RCAR_CANFD is not set
|
||||
|
||||
# Needs work/investigation
|
||||
# CONFIG_ARM_KPROBES_TEST is not set
|
||||
|
@ -745,6 +728,7 @@ CONFIG_R8188EU=m
|
|||
# CONFIG_DM9000 is not set
|
||||
# CONFIG_MTD_AFS_PARTS is not set
|
||||
# CONFIG_SPI_PXA2XX is not set
|
||||
# CONFIG_SPI_CADENCE_QUADSPI is not set
|
||||
# CONFIG_DEPRECATED_PARAM_STRUCT is not set
|
||||
# CONFIG_LATTICE_ECP3_CONFIG is not set
|
||||
# CONFIG_SERIAL_8250_EM is not set
|
||||
|
|
|
@ -18,24 +18,6 @@ CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
|
|||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8
|
||||
|
||||
CONFIG_CMA_SIZE_SEL_MBYTES=y
|
||||
CONFIG_CMA_SIZE_MBYTES=64
|
||||
|
||||
# Cortex-A15
|
||||
CONFIG_ARM_ERRATA_798181=y
|
||||
CONFIG_ARM_ERRATA_773022=y
|
||||
|
||||
# Little.BIG
|
||||
CONFIG_BIG_LITTLE=y
|
||||
CONFIG_BL_SWITCHER=y
|
||||
CONFIG_EXYNOS5420_MCPM=y
|
||||
CONFIG_ARCH_VEXPRESS_DCSCB=y
|
||||
CONFIG_ARCH_VEXPRESS_TC2_PM=y
|
||||
CONFIG_ARM_BIG_LITTLE_CPUFREQ=m
|
||||
CONFIG_ARM_SCPI_CPUFREQ=m
|
||||
CONFIG_ARM_VEXPRESS_SPC_CPUFREQ=m
|
||||
# CONFIG_BL_SWITCHER_DUMMY_IF is not set
|
||||
|
||||
CONFIG_KVM=y
|
||||
CONFIG_KVM_ARM_HOST=y
|
||||
CONFIG_KVM_NEW_VGIC=y
|
||||
|
|
107
config-generic
107
config-generic
|
@ -9,6 +9,7 @@ CONFIG_HOTPLUG_CPU=y
|
|||
CONFIG_LOCALVERSION=""
|
||||
CONFIG_CROSS_COMPILE=""
|
||||
CONFIG_DEFAULT_HOSTNAME="(none)"
|
||||
# CONFIG_GCC_PLUGINS is not set
|
||||
|
||||
#
|
||||
# Code maturity level options
|
||||
|
@ -33,6 +34,7 @@ CONFIG_KERNEL_GZIP=y
|
|||
# CONFIG_KERNEL_LZMA is not set
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
# CONFIG_COMPILE_TEST is not set
|
||||
|
@ -74,6 +76,7 @@ CONFIG_PREEMPT_VOLUNTARY=y
|
|||
# CONFIG_PREEMPT is not set
|
||||
|
||||
CONFIG_SLUB=y
|
||||
CONFIG_SLAB_FREELIST_RANDOM=y
|
||||
CONFIG_SLUB_CPU_PARTIAL=y
|
||||
# CONFIG_SLUB_STATS is not set
|
||||
# CONFIG_SLUB_DEBUG_ON is not set
|
||||
|
@ -111,7 +114,7 @@ CONFIG_HOTPLUG_PCI=y
|
|||
# CONFIG_HOTPLUG_PCI_SHPC is not set
|
||||
CONFIG_HOTPLUG_PCI_PCIE=y
|
||||
# CONFIG_PCIE_DW_PLAT is not set
|
||||
CONFIG_PCIE_DPC=m
|
||||
CONFIG_PCIE_DPC=y
|
||||
|
||||
# CONFIG_SGI_IOC4 is not set
|
||||
|
||||
|
@ -196,6 +199,7 @@ CONFIG_INFINIBAND_OCRDMA=m
|
|||
CONFIG_INFINIBAND_USNIC=m
|
||||
|
||||
CONFIG_INFINIBAND_RDMAVT=m
|
||||
CONFIG_RDMA_RXE=m
|
||||
|
||||
#
|
||||
# Executable file formats
|
||||
|
@ -217,6 +221,7 @@ CONFIG_BINFMT_MISC=m
|
|||
# CONFIG_COMMON_CLK_CDCE925 is not set
|
||||
# CONFIG_COMMON_CLK_OXNAS is not set
|
||||
# CONFIG_COMMON_CLK_HI3519 is not set
|
||||
# CONFIG_SUNXI_CCU is not set
|
||||
|
||||
#
|
||||
# Generic Driver Options
|
||||
|
@ -228,7 +233,6 @@ CONFIG_EXTRA_FIRMWARE=""
|
|||
CONFIG_FW_CFG_SYSFS=m
|
||||
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
|
||||
|
||||
|
||||
# Give this a try in rawhide for now
|
||||
# CONFIG_FW_LOADER_USER_HELPER is not set
|
||||
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
|
||||
|
@ -426,11 +430,13 @@ CONFIG_VIRTIO_INPUT=m
|
|||
CONFIG_VIRTIO_MMIO=m
|
||||
# CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES is not set
|
||||
CONFIG_VIRTIO_NET=m
|
||||
CONFIG_VIRTIO_VSOCKETS=m
|
||||
CONFIG_HW_RANDOM_VIRTIO=m
|
||||
CONFIG_VIRTIO_CONSOLE=m
|
||||
CONFIG_VHOST_NET=m
|
||||
CONFIG_VHOST_SCSI=m
|
||||
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
|
||||
CONFIG_VHOST_VSOCK=m
|
||||
|
||||
#
|
||||
# SCSI device support
|
||||
|
@ -524,6 +530,8 @@ CONFIG_SCSI_UFSHCD=m
|
|||
CONFIG_SCSI_UFSHCD_PCI=m
|
||||
# CONFIG_SCSI_UFSHCD_PLATFORM is not set
|
||||
|
||||
# CONFIG_SCSI_UFS_DWC_TC_PCI is not set
|
||||
|
||||
CONFIG_SCSI_MVUMI=m
|
||||
|
||||
CONFIG_SCSI_OSD_INITIATOR=m
|
||||
|
@ -736,6 +744,14 @@ CONFIG_FUSION_LAN=m
|
|||
CONFIG_FUSION_SAS=m
|
||||
CONFIG_FUSION_LOGGING=y
|
||||
|
||||
#
|
||||
# NVME support
|
||||
#
|
||||
CONFIG_NVME_RDMA=m
|
||||
CONFIG_NVME_TARGET=m
|
||||
CONFIG_NVME_TARGET_LOOP=m
|
||||
CONFIG_NVME_TARGET_RDMA=m
|
||||
|
||||
#
|
||||
# IEEE 1394 (FireWire) support (JUJU alternative stack)
|
||||
#
|
||||
|
@ -778,6 +794,7 @@ CONFIG_TCP_CONG_CDG=m
|
|||
CONFIG_TCP_CONG_LP=m
|
||||
CONFIG_TCP_CONG_SCALABLE=m
|
||||
CONFIG_TCP_CONG_VEGAS=m
|
||||
CONFIG_TCP_CONG_NV=m
|
||||
CONFIG_TCP_CONG_VENO=m
|
||||
CONFIG_TCP_CONG_WESTWOOD=m
|
||||
CONFIG_TCP_CONG_YEAH=m
|
||||
|
@ -1250,6 +1267,7 @@ CONFIG_NET_CLS_FLOWER=m
|
|||
CONFIG_NET_CLS_FLOW=m
|
||||
CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_IND=y
|
||||
CONFIG_NET_CLS_MATCHALL=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
CONFIG_NET_CLS_ROUTE=y
|
||||
CONFIG_NET_CLS_RSVP=m
|
||||
|
@ -1607,7 +1625,6 @@ CONFIG_NET_VENDOR_SIS=y
|
|||
CONFIG_SIS900=m
|
||||
CONFIG_SIS190=m
|
||||
|
||||
|
||||
CONFIG_NET_VENDOR_SMSC=y
|
||||
CONFIG_PCMCIA_SMC91C92=m
|
||||
CONFIG_EPIC100=m
|
||||
|
@ -1664,6 +1681,8 @@ CONFIG_NATIONAL_PHY=m
|
|||
CONFIG_ICPLUS_PHY=m
|
||||
CONFIG_BCM63XX_PHY=m
|
||||
CONFIG_BCM7XXX_PHY=m
|
||||
CONFIG_INTEL_XWAY_PHY=m
|
||||
# CONFIG_MDIO_HISI_FEMAC is not set
|
||||
CONFIG_LSI_ET1011C_PHY=m
|
||||
CONFIG_LXT_PHY=m
|
||||
CONFIG_MARVELL_PHY=m
|
||||
|
@ -1708,7 +1727,6 @@ CONFIG_JME=m
|
|||
# Ethernet (10000 Mbit)
|
||||
# CONFIG_NET_VENDOR_AURORA is not set
|
||||
|
||||
#
|
||||
CONFIG_MLX4_CORE=m
|
||||
CONFIG_MLX4_EN=m
|
||||
CONFIG_MLX4_EN_DCB=y
|
||||
|
@ -1751,7 +1769,6 @@ CONFIG_SLIP_SMART=y
|
|||
#
|
||||
# Wireless LAN
|
||||
#
|
||||
#
|
||||
CONFIG_WLAN=y
|
||||
# CONFIG_STRIP is not set
|
||||
# CONFIG_PCMCIA_RAYCS is not set
|
||||
|
@ -2007,6 +2024,7 @@ CONFIG_MPLS_ROUTING=m
|
|||
CONFIG_MPLS_IPTUNNEL=m
|
||||
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NET_NCSI=y
|
||||
|
||||
CONFIG_6LOWPAN=m
|
||||
CONFIG_6LOWPAN_NHC=m
|
||||
|
@ -2200,8 +2218,6 @@ CONFIG_BT_HIDP=m
|
|||
# Bluetooth device drivers
|
||||
#
|
||||
CONFIG_BT_HCIBTUSB=m
|
||||
# Disable the BT_HCIUSB driver.
|
||||
# It sucks more power than BT_HCIBTUSB which has the same functionality.
|
||||
CONFIG_BT_HCIBTUSB_BCM=y
|
||||
CONFIG_BT_HCIBTUSB_RTL=y
|
||||
CONFIG_BT_HCIUART=m
|
||||
|
@ -2241,20 +2257,19 @@ CONFIG_MISDN_SPEEDFAX=m
|
|||
CONFIG_MISDN_INFINEON=m
|
||||
CONFIG_MISDN_W6692=m
|
||||
CONFIG_MISDN_NETJET=m
|
||||
CONFIG_MISDN_HFCUSB=m
|
||||
CONFIG_MISDN_HFCPCI=m
|
||||
CONFIG_MISDN_HFCMULTI=m
|
||||
|
||||
#
|
||||
# mISDN hardware drivers
|
||||
#
|
||||
CONFIG_MISDN_HFCPCI=m
|
||||
CONFIG_MISDN_HFCMULTI=m
|
||||
CONFIG_ISDN_I4L=m
|
||||
CONFIG_ISDN_DRV_AVMB1_B1PCI=m
|
||||
CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
|
||||
CONFIG_ISDN_DRV_AVMB1_T1PCI=m
|
||||
CONFIG_ISDN_DRV_AVMB1_C4=m
|
||||
|
||||
CONFIG_MISDN_HFCUSB=m
|
||||
|
||||
CONFIG_ISDN_PPP=y
|
||||
CONFIG_ISDN_PPP_VJ=y
|
||||
CONFIG_ISDN_MPP=y
|
||||
|
@ -2379,6 +2394,7 @@ CONFIG_TABLET_USB_AIPTEK=m
|
|||
CONFIG_TABLET_USB_GTCO=m
|
||||
CONFIG_TABLET_USB_HANWANG=m
|
||||
CONFIG_TABLET_USB_KBTAB=m
|
||||
CONFIG_TABLET_USB_PEGASUS=m
|
||||
CONFIG_TABLET_SERIAL_WACOM4=m
|
||||
|
||||
CONFIG_INPUT_POWERMATE=m
|
||||
|
@ -2387,6 +2403,7 @@ CONFIG_INPUT_CM109=m
|
|||
CONFIG_INPUT_POLLDEV=m
|
||||
CONFIG_INPUT_SPARSEKMAP=m
|
||||
# CONFIG_INPUT_ADXL34X is not set
|
||||
# CONFIG_INPUT_ATMEL_CAPTOUCH is not set
|
||||
# CONFIG_INPUT_BMA150 is not set
|
||||
# CONFIG_INPUT_IMS_PCU is not set
|
||||
CONFIG_INPUT_CMA3000=m
|
||||
|
@ -2536,7 +2553,11 @@ CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
|
|||
# CONFIG_TOUCHSCREEN_WM97XX is not set
|
||||
CONFIG_TOUCHSCREEN_W90X900=m
|
||||
# CONFIG_TOUCHSCREEN_BU21013 is not set
|
||||
CONFIG_TOUCHSCREEN_RM_TS=m
|
||||
CONFIG_TOUCHSCREEN_SILEAD=m
|
||||
CONFIG_TOUCHSCREEN_SIS_I2C=m
|
||||
CONFIG_TOUCHSCREEN_ST1232=m
|
||||
# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set
|
||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=m
|
||||
# CONFIG_TOUCHSCREEN_MAX11801 is not set
|
||||
CONFIG_TOUCHSCREEN_AUO_PIXCIR=m
|
||||
|
@ -2615,6 +2636,11 @@ CONFIG_TCG_ATMEL=m
|
|||
# CONFIG_TCG_INFINEON is not set
|
||||
# CONFIG_TCG_TIS_ST33ZP24 is not set
|
||||
# CONFIG_TCG_XEN is not set
|
||||
# CONFIG_TCG_TIS_SPI is not set
|
||||
# CONFIG_TCG_VTPM_PROXY is not set
|
||||
# CONFIG_TCG_TIS_ST33ZP24_I2C is not set
|
||||
# CONFIG_TCG_TIS_ST33ZP24_SPI is not set
|
||||
|
||||
CONFIG_TELCLOCK=m
|
||||
|
||||
#
|
||||
|
@ -2786,6 +2812,7 @@ CONFIG_SENSORS_F71805F=m
|
|||
CONFIG_SENSORS_F71882FG=m
|
||||
CONFIG_SENSORS_F75375S=m
|
||||
CONFIG_SENSORS_FSCHMD=m
|
||||
CONFIG_SENSORS_FTSTEUTATES=m
|
||||
CONFIG_SENSORS_G760A=m
|
||||
CONFIG_SENSORS_G762=m
|
||||
CONFIG_SENSORS_GL518SM=m
|
||||
|
@ -2834,6 +2861,7 @@ CONFIG_SENSORS_PC87360=m
|
|||
CONFIG_SENSORS_PC87427=m
|
||||
CONFIG_SENSORS_PCF8591=m
|
||||
CONFIG_SENSORS_SHT15=m
|
||||
CONFIG_SENSORS_SHT3x=m
|
||||
CONFIG_SENSORS_SHTC1=m
|
||||
CONFIG_SENSORS_SIS5595=m
|
||||
CONFIG_CHARGER_SMB347=m
|
||||
|
@ -2871,6 +2899,7 @@ CONFIG_SENSORS_LM73=m
|
|||
CONFIG_SENSORS_AMC6821=m
|
||||
CONFIG_SENSORS_INA2XX=m
|
||||
CONFIG_SENSORS_INA209=m
|
||||
CONFIG_SENSORS_INA3221=m
|
||||
CONFIG_SENSORS_ADT7411=m
|
||||
CONFIG_SENSORS_ASC7621=m
|
||||
CONFIG_SENSORS_EMC1403=m
|
||||
|
@ -2932,8 +2961,10 @@ CONFIG_IIO_BUFFER_CB=y
|
|||
CONFIG_IIO_TRIGGERED_BUFFER=m
|
||||
CONFIG_IIO_TRIGGER=y
|
||||
CONFIG_IIO_SW_TRIGGER=y
|
||||
CONFIG_IIO_SW_DEVICE=m
|
||||
CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
|
||||
CONFIG_IIO_INTERRUPT_TRIGGER=m
|
||||
CONFIG_IIO_TIGHTLOOP_TRIGGER=m
|
||||
CONFIG_HID_SENSOR_IIO_COMMON=m
|
||||
CONFIG_HID_SENSOR_IIO_TRIGGER=m
|
||||
CONFIG_IIO_CONFIGFS=m
|
||||
|
@ -2944,6 +2975,7 @@ CONFIG_IIO_CONFIGFS=m
|
|||
# CONFIG_AD5380 is not set
|
||||
# CONFIG_AD5064 is not set
|
||||
# CONFIG_BMA180 is not set
|
||||
# CONFIG_BMA220 is not set
|
||||
CONFIG_BMC150_ACCEL=m
|
||||
# CONFIG_MAX1363 is not set
|
||||
# CONFIG_MAX517 is not set
|
||||
|
@ -2975,9 +3007,14 @@ CONFIG_STK3310=m
|
|||
# CONFIG_CC10001_ADC is not set
|
||||
# CONFIG_INV_MPU6050_IIO is not set
|
||||
CONFIG_IIO_ST_GYRO_3AXIS=m
|
||||
CONFIG_IIO_ST_GYRO_I2C_3AXIS=m
|
||||
CONFIG_IIO_ST_GYRO_SPI_3AXIS=m
|
||||
CONFIG_IIO_ST_MAGN_3AXIS=m
|
||||
# CONFIG_BMC150_MAGN is not set
|
||||
CONFIG_MMA7660=m
|
||||
CONFIG_IIO_ST_ACCEL_3AXIS=m
|
||||
CONFIG_IIO_ST_ACCEL_I2C_3AXIS=m
|
||||
CONFIG_IIO_ST_ACCEL_SPI_3AXIS=m
|
||||
CONFIG_HID_SENSOR_INCLINOMETER_3D=m
|
||||
CONFIG_HID_SENSOR_DEVICE_ROTATION=m
|
||||
CONFIG_ACPI_ALS=m
|
||||
|
@ -3088,6 +3125,7 @@ CONFIG_PA12203001=m
|
|||
# CONFIG_BMC150_MAGN_I2C is not set
|
||||
# CONFIG_BMC150_MAGN_SPI is not set
|
||||
# CONFIG_DS1803 is not set
|
||||
# CONFIG_MAX5487 is not set
|
||||
# CONFIG_MCP4131 is not set
|
||||
# CONFIG_HP03 is not set
|
||||
# CONFIG_HP206C is not set
|
||||
|
@ -3268,6 +3306,7 @@ CONFIG_RTC_DRV_M41T80=m
|
|||
CONFIG_RTC_DRV_M41T80_WDT=y
|
||||
CONFIG_RTC_DRV_M48T59=m
|
||||
CONFIG_RTC_DRV_MAX6900=m
|
||||
CONFIG_RTC_DRV_MAX6916=m
|
||||
# CONFIG_RTC_DRV_M48T86 is not set
|
||||
CONFIG_RTC_DRV_PCF2127=m
|
||||
CONFIG_RTC_DRV_PCF8563=m
|
||||
|
@ -3371,6 +3410,7 @@ CONFIG_DRM_MGAG200=m # do not enable on f17 or older
|
|||
CONFIG_DRM_I915=m
|
||||
# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set
|
||||
CONFIG_DRM_I915_USERPTR=y
|
||||
CONFIG_DRM_I915_GVT=y
|
||||
CONFIG_DRM_VIA=m
|
||||
CONFIG_DRM_NOUVEAU=m
|
||||
CONFIG_NOUVEAU_DEBUG=5
|
||||
|
@ -3392,6 +3432,11 @@ CONFIG_DRM_VIRTIO_GPU=m
|
|||
# CONFIG_DRM_PANEL_SIMPLE is not set
|
||||
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set
|
||||
CONFIG_DRM_VGEM=m
|
||||
# CONFIG_DRM_MALI_DISPLAY is not set
|
||||
# CONFIG_DRM_SII902X is not set
|
||||
# CONFIG_DRM_TOSHIBA_TC358767 is not set
|
||||
# CONFIG_DRM_I2C_ADV7533 is not set
|
||||
|
||||
|
||||
#
|
||||
# PCMCIA character devices
|
||||
|
@ -4092,6 +4137,7 @@ CONFIG_HID_GREENASIA=m
|
|||
CONFIG_HID_SMARTJOYPLUS=m
|
||||
CONFIG_HID_TOPSEED=m
|
||||
CONFIG_HID_THINGM=m
|
||||
CONFIG_HID_LED=m
|
||||
CONFIG_HID_THRUSTMASTER=m
|
||||
CONFIG_HID_XINMO=m
|
||||
CONFIG_HID_ZEROPLUS=m
|
||||
|
@ -4104,6 +4150,7 @@ CONFIG_HID_SENSOR_ALS=m
|
|||
# CONFIG_HID_SENSOR_PROX is not set
|
||||
CONFIG_HID_SENSOR_ACCEL_3D=m
|
||||
# CONFIG_HID_SENSOR_CUSTOM_SENSOR is not set
|
||||
CONFIG_HID_ALPS=m
|
||||
CONFIG_HID_EMS_FF=m
|
||||
CONFIG_HID_ELECOM=m
|
||||
CONFIG_HID_ELO=m
|
||||
|
@ -4700,6 +4747,8 @@ CONFIG_NFSD_PNFS=y
|
|||
CONFIG_NFSD_BLOCKLAYOUT=y
|
||||
CONFIG_NFSD_SCSILAYOUT=y
|
||||
CONFIG_NFSD_V4_SECURITY_LABEL=y
|
||||
# This is labeled as 'bare minimum' and 'not for production'
|
||||
# CONFIG_NFSD_FLEXFILELAYOUT is not set
|
||||
CONFIG_NFS_FSCACHE=y
|
||||
# CONFIG_NFS_USE_LEGACY_DNS is not set
|
||||
CONFIG_PNFS_OBJLAYOUT=m
|
||||
|
@ -5036,6 +5085,7 @@ CONFIG_CRYPTO_SEED=m
|
|||
CONFIG_CRYPTO_SEQIV=m
|
||||
CONFIG_CRYPTO_SERPENT=m
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA3=m
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_SHA512=m
|
||||
CONFIG_CRYPTO_TEA=m
|
||||
|
@ -5056,6 +5106,8 @@ CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y
|
|||
CONFIG_CRYPTO_PCRYPT=m
|
||||
CONFIG_CRYPTO_USER=m
|
||||
CONFIG_CRYPTO_RSA=m
|
||||
CONFIG_CRYPTO_DH=m
|
||||
CONFIG_CRYPTO_ECDH=m
|
||||
CONFIG_CRYPTO_CHACHA20POLY1305=m
|
||||
CONFIG_CRYPTO_ECHAINIV=m
|
||||
CONFIG_CRYPTO_POLY1305=m
|
||||
|
@ -5234,7 +5286,7 @@ CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
|||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_STAT=m
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_FREQ_STAT_DETAILS=y
|
||||
|
||||
|
||||
|
@ -5274,22 +5326,27 @@ CONFIG_SND_INDIGODJX=m
|
|||
CONFIG_SND_SOC=m
|
||||
CONFIG_SND_SIMPLE_CARD=m
|
||||
CONFIG_SND_DESIGNWARE_I2S=m
|
||||
CONFIG_SND_DESIGNWARE_PCM=m
|
||||
CONFIG_SND_SOC_ALL_CODECS=m
|
||||
CONFIG_SND_SOC_DMIC=m
|
||||
CONFIG_SND_SOC_SPDIF=m
|
||||
CONFIG_SND_DMAENGINE_PCM=m
|
||||
CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
|
||||
# CONFIG_SND_SOC_ADAU1701 is not set
|
||||
# CONFIG_SND_SOC_ADAU7002 is not set
|
||||
# CONFIG_SND_SOC_AK4104 is not set
|
||||
# CONFIG_SND_SOC_AK4554 is not set
|
||||
# CONFIG_SND_SOC_AK4642 is not set
|
||||
# CONFIG_SND_SOC_AK5386 is not set
|
||||
# CONFIG_SND_SOC_AK4613 is not set
|
||||
# CONFIG_SND_SOC_BT_SCO is not set
|
||||
# CONFIG_SND_SOC_CS35L33 is not set
|
||||
# CONFIG_SND_SOC_CS42L52 is not set
|
||||
# CONFIG_SND_SOC_CS42L73 is not set
|
||||
# CONFIG_SND_SOC_CS4270 is not set
|
||||
# CONFIG_SND_SOC_CS4271 is not set
|
||||
# CONFIG_SND_SOC_CS42XX8_I2C is not set
|
||||
# CONFIG_SND_SOC_CS53L30 is not set
|
||||
# CONFIG_SND_SOC_PCM1681 is not set
|
||||
# CONFIG_SND_SOC_PCM179X is not set
|
||||
# CONFIG_SND_SOC_PCM3168A_I2C is not set
|
||||
|
@ -5364,6 +5421,9 @@ CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
|
|||
CONFIG_SND_SOC_AMD_ACP=m
|
||||
# CONFIG_SND_SOC_TAS5720 is not set
|
||||
# CONFIG_SND_SOC_WM8960 is not set
|
||||
# CONFIG_SND_SOC_MAX98504 is not set
|
||||
# CONFIG_SND_SOC_MAX9860 is not set
|
||||
# CONFIG_SND_SOC_WM8985 is not set
|
||||
|
||||
|
||||
CONFIG_BALLOON_COMPACTION=y
|
||||
|
@ -5413,9 +5473,11 @@ CONFIG_LEDS_LM3530=m
|
|||
# CONFIG_LEDS_IS31FL32XX is not set
|
||||
CONFIG_LEDS_BLINKM=m
|
||||
CONFIG_LEDS_LP3944=m
|
||||
CONFIG_LEDS_LP3952=m
|
||||
CONFIG_LEDS_LT3593=m
|
||||
CONFIG_LEDS_REGULATOR=m
|
||||
CONFIG_LEDS_TRIGGER_GPIO=m
|
||||
CONFIG_LEDS_TRIGGER_DISK=y
|
||||
CONFIG_LEDS_WM8350=m
|
||||
CONFIG_LEDS_WM831X_STATUS=m
|
||||
# CONFIG_LEDS_DAC124S085 is not set
|
||||
|
@ -5427,8 +5489,8 @@ CONFIG_LEDS_WM831X_STATUS=m
|
|||
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DW_DMAC_CORE=m
|
||||
CONFIG_DW_DMAC=m
|
||||
CONFIG_DW_DMAC_CORE=m
|
||||
CONFIG_DW_DMAC_PCI=m
|
||||
# CONFIG_IDMA64 is not set
|
||||
# CONFIG_DW_DMAC_BIG_ENDIAN_IO is not set
|
||||
|
@ -5439,7 +5501,7 @@ CONFIG_DW_DMAC_PCI=m
|
|||
CONFIG_ASYNC_TX_DMA=y
|
||||
# CONFIG_HSU_DMA is not set
|
||||
# CONFIG_HSU_DMA_PCI is not set
|
||||
# CONFIG_XGENE_DMA is not set
|
||||
# CONFIG_XILINX_DMA is not set
|
||||
# CONFIG_INTEL_IDMA64 is not set
|
||||
# CONFIG_QCOM_HIDMA_MGMT is not set
|
||||
# CONFIG_QCOM_HIDMA is not set
|
||||
|
@ -5536,6 +5598,8 @@ CONFIG_POWER_RESET=y
|
|||
# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set
|
||||
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
|
||||
# CONFIG_POWER_RESET_RESTART is not set
|
||||
# CONFIG_SYSCON_REBOOT_MODE is not set
|
||||
# CONFIG_POWER_RESET_BRCMKONA is not set
|
||||
|
||||
# CONFIG_PDA_POWER is not set
|
||||
|
||||
|
@ -5621,6 +5685,12 @@ CONFIG_NET_DSA_MV88E6060=m
|
|||
CONFIG_NET_DSA_MV88E6XXX=m
|
||||
CONFIG_NET_DSA_BCM_SF2=m
|
||||
|
||||
CONFIG_B53=m
|
||||
CONFIG_B53_SPI_DRIVER=m
|
||||
CONFIG_B53_MDIO_DRIVER=m
|
||||
CONFIG_B53_MMAP_DRIVER=m
|
||||
CONFIG_B53_SRAB_DRIVER=m
|
||||
|
||||
# Used by Maemo, we don't care.
|
||||
# CONFIG_PHONET is not set
|
||||
|
||||
|
@ -5653,6 +5723,7 @@ CONFIG_STAGING=y
|
|||
# CONFIG_ANDROID is not set
|
||||
# CONFIG_STAGING_BOARD is not set
|
||||
CONFIG_STAGING_MEDIA=y
|
||||
# CONFIG_MEDIA_CEC is not set
|
||||
# CONFIG_DVB_AS102 is not set
|
||||
# CONFIG_SLICOSS is not set
|
||||
# CONFIG_VIDEO_DT3155 is not set
|
||||
|
@ -5712,6 +5783,7 @@ CONFIG_USBIP_VUDC=m
|
|||
# CONFIG_WILC1000_SDIO is not set
|
||||
# CONFIG_WILC1000_SPI is not set
|
||||
# CONFIG_LNET is not set
|
||||
# CONFIG_KS7010 is not set
|
||||
# END OF STAGING
|
||||
|
||||
#
|
||||
|
@ -5732,6 +5804,7 @@ CONFIG_PWM=y
|
|||
# CONFIG_PWM_PCA9685 is not set
|
||||
|
||||
CONFIG_LSM_MMAP_MIN_ADDR=65536
|
||||
CONFIG_HARDENED_USERCOPY=y
|
||||
|
||||
CONFIG_STRIP_ASM_SYMS=y
|
||||
|
||||
|
@ -5924,7 +5997,7 @@ CONFIG_IOMMU_SUPPORT=y
|
|||
# CONFIG_MAILBOX_TEST is not set
|
||||
|
||||
# CONFIG_RESET_CONTROLLER is not set
|
||||
|
||||
# CONFIG_TI_SYSCON_RESET is not set
|
||||
CONFIG_FMC=m
|
||||
CONFIG_FMC_FAKEDEV=m
|
||||
CONFIG_FMC_TRIVIAL=m
|
||||
|
@ -5939,7 +6012,8 @@ CONFIG_POWERCAP=y
|
|||
|
||||
# CONFIG_HSI is not set
|
||||
|
||||
# CONFIG_CPU_IDLE is not set
|
||||
CONFIG_CPU_IDLE=y
|
||||
# CONFIG_CPU_IDLE_GOV_LADDER is not set
|
||||
|
||||
# CONFIG_ARM_ARCH_TIMER_EVTSTREAM is not set
|
||||
# CONFIG_ASM9260_TIMER is not set
|
||||
|
@ -5976,7 +6050,6 @@ CONFIG_SYSTEM_BLACKLIST_KEYRING=y
|
|||
# CONFIG_MODULE_COMPRESS is not set
|
||||
|
||||
# CONFIG_RTC_DRV_EFI is not set
|
||||
# CONFIG_NET_XGENE is not set
|
||||
|
||||
# CONFIG_GLOB_SELFTEST is not set
|
||||
|
||||
|
|
|
@ -69,8 +69,6 @@ CONFIG_RCU_FANOUT_LEAF=16
|
|||
CONFIG_FA_DUMP=y
|
||||
CONFIG_RELOCATABLE=y
|
||||
|
||||
CONFIG_CPU_IDLE=y
|
||||
# CONFIG_CPU_IDLE_GOV_LADDER is not set
|
||||
CONFIG_POWERNV_CPUIDLE=y
|
||||
CONFIG_PSERIES_CPUIDLE=y
|
||||
|
||||
|
@ -121,6 +119,8 @@ CONFIG_IPMI_POWERNV=m
|
|||
CONFIG_RTAS_FLASH=y
|
||||
CONFIG_OPAL_PRD=m
|
||||
CONFIG_MTD_POWERNV_FLASH=m
|
||||
# CONFIG_HOTPLUG_PCI_POWERNV is not set
|
||||
# CONFIG_POWERNV_OP_PANEL is not set
|
||||
|
||||
# Power 7 and later
|
||||
CONFIG_PPC_TRANSACTIONAL_MEM=y
|
||||
|
@ -161,6 +161,7 @@ CONFIG_SCSI_IBMVSCSI=m
|
|||
CONFIG_SCSI_IPR=m
|
||||
CONFIG_SCSI_IPR_TRACE=y
|
||||
CONFIG_SCSI_IPR_DUMP=y
|
||||
CONFIG_SCSI_IBMVSCSIS=m
|
||||
|
||||
CONFIG_SERIAL_ICOM=m
|
||||
# CONFIG_SERIAL_8250 is not set
|
||||
|
@ -209,6 +210,7 @@ CONFIG_LEDS_TRIGGER_TIMER=m
|
|||
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
|
||||
CONFIG_LEDS_TRIGGER_GPIO=m
|
||||
CONFIG_LEDS_POWERNV=m
|
||||
CONFIG_ADB_PMU_LED_DISK=y
|
||||
|
||||
CONFIG_USB_EHCI_HCD_PPC_OF=y
|
||||
CONFIG_USB_OHCI_HCD_PCI=y
|
||||
|
@ -374,3 +376,8 @@ CONFIG_POWER_RESET_GPIO_RESTART=y
|
|||
CONFIG_FB_SSD1307=m
|
||||
CONFIG_INPUT_PWM_BEEPER=m
|
||||
CONFIG_BACKLIGHT_PWM=m
|
||||
|
||||
CONFIG_CRYPT_CRC32C_VPMSUM=m
|
||||
|
||||
# CONFIG_JUMP_LABEL_FEATURE_CHECKS is not set
|
||||
# CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG is not set
|
||||
|
|
|
@ -135,6 +135,7 @@ CONFIG_CRYPTO_GHASH_S390=m
|
|||
CONFIG_CRYPTO_SHA1_S390=m
|
||||
CONFIG_CRYPTO_SHA256_S390=m
|
||||
CONFIG_CRYPTO_SHA512_S390=m
|
||||
CONFIG_CRYPTO_CRC32_S390=m
|
||||
|
||||
#
|
||||
# Kernel hacking
|
||||
|
@ -158,6 +159,7 @@ CONFIG_MONREADER=m
|
|||
CONFIG_STACK_GUARD=256
|
||||
CONFIG_CMM_IUCV=y
|
||||
|
||||
# CONFIG_CPU_IDLE is not set
|
||||
|
||||
CONFIG_S390_HYPFS_FS=y
|
||||
|
||||
|
@ -178,6 +180,7 @@ CONFIG_QETH_L3=m
|
|||
CONFIG_KVM=m
|
||||
# CONFIG_KVM_S390_UCONTROL is not set
|
||||
CONFIG_S390_GUEST=y
|
||||
CONFIG_S390_GUEST_OLD_TRANSPORT=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ CONFIG_X86_MPPARSE=y
|
|||
CONFIG_MMIOTRACE=y
|
||||
# CONFIG_MMIOTRACE_TEST is not set
|
||||
# CONFIG_DEBUG_PER_CPU_MAPS is not set
|
||||
# CONFIG_DEBUG_WX is not set
|
||||
CONFIG_DEBUG_WX=y
|
||||
CONFIG_DEBUG_STACKOVERFLOW=y
|
||||
|
||||
CONFIG_ACPI=y
|
||||
|
@ -86,7 +86,6 @@ CONFIG_ACPI_BUTTON=y
|
|||
CONFIG_ACPI_CONTAINER=y
|
||||
CONFIG_ACPI_DOCK=y
|
||||
CONFIG_ACPI_FAN=y
|
||||
CONFIG_ACPI_NUMA=y
|
||||
CONFIG_ACPI_PROCESSOR=y
|
||||
CONFIG_ACPI_PROCFS=y
|
||||
CONFIG_ACPI_SBS=m
|
||||
|
@ -95,6 +94,7 @@ CONFIG_ACPI_THERMAL=y
|
|||
CONFIG_ACPI_TOSHIBA=m
|
||||
CONFIG_ACPI_VIDEO=m
|
||||
CONFIG_ACPI_INITRD_TABLE_OVERRIDE=y
|
||||
CONFIG_ACPI_CONFIGFS=m
|
||||
# FIXME: Next two are deprecated. Remove them when they disappear upstream
|
||||
# CONFIG_ACPI_PROCFS_POWER is not set
|
||||
CONFIG_PNPACPI=y
|
||||
|
@ -105,6 +105,7 @@ CONFIG_ACPI_APEI_PCIEAER=y
|
|||
CONFIG_ACPI_APEI_GHES=y
|
||||
CONFIG_ACPI_APEI_MEMORY_FAILURE=y
|
||||
# CONFIG_ACPI_APEI_EINJ is not set
|
||||
CONFIG_DPTF_POWER=m
|
||||
CONFIG_ACPI_IPMI=m
|
||||
CONFIG_ACPI_CUSTOM_METHOD=m
|
||||
CONFIG_ACPI_BGRT=y
|
||||
|
@ -116,10 +117,11 @@ CONFIG_INTEL_SOC_PMIC=y
|
|||
CONFIG_PMIC_OPREGION=y
|
||||
CONFIG_CRC_PMIC_OPREGION=y
|
||||
CONFIG_XPOWER_PMIC_OPREGION=y
|
||||
CONFIG_BXT_WC_PMIC_OPREGION=y
|
||||
CONFIG_GPIO_CRYSTAL_COVE=y
|
||||
CONFIG_AXP288_ADC=y
|
||||
CONFIG_AXP288_FUEL_GAUGE=y
|
||||
# CONFIG_PWM_CRC is not set
|
||||
CONFIG_PWM_CRC=y
|
||||
|
||||
|
||||
CONFIG_X86_INTEL_PSTATE=y
|
||||
|
@ -243,6 +245,7 @@ CONFIG_FUJITSU_TABLET=m
|
|||
CONFIG_FUJITSU_LAPTOP=m
|
||||
# CONFIG_FUJITSU_LAPTOP_DEBUG is not set
|
||||
CONFIG_IDEAPAD_LAPTOP=m
|
||||
CONFIG_INTEL_VBTN=m
|
||||
CONFIG_INTEL_HID_EVENT=m
|
||||
CONFIG_MSI_LAPTOP=m
|
||||
CONFIG_PANASONIC_LAPTOP=m
|
||||
|
@ -274,6 +277,7 @@ CONFIG_PVPANIC=m
|
|||
|
||||
# CONFIG_TOUCHSCREEN_INTEL_MID is not set
|
||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
||||
CONFIG_TOUCHSCREEN_SURFACE3_SPI=m
|
||||
|
||||
# CONFIG_SMSC37B787_WDT is not set
|
||||
CONFIG_VIA_WDT=m
|
||||
|
@ -341,11 +345,6 @@ CONFIG_SPI_PXA2XX=m
|
|||
CONFIG_MTD_ESB2ROM=m
|
||||
CONFIG_MTD_CK804XROM=m
|
||||
|
||||
CONFIG_CPU_IDLE=y
|
||||
# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set
|
||||
# CONFIG_CPU_IDLE_GOV_LADDER is not set
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
|
||||
CONFIG_THINKPAD_ACPI=m
|
||||
# CONFIG_THINKPAD_ACPI_DEBUG is not set
|
||||
# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
|
||||
|
@ -461,7 +460,6 @@ CONFIG_INTEL_PMC_CORE=y
|
|||
|
||||
CONFIG_VIDEO_VIA_CAMERA=m
|
||||
|
||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_X86_RESERVE_LOW=64
|
||||
|
||||
# CONFIG_IRQ_DOMAIN_DEBUG is not set
|
||||
|
@ -565,10 +563,12 @@ CONFIG_SND_SOC_INTEL_SKL_RT286_MACH=m
|
|||
CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BXT_RT298_MACH=m
|
||||
CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH=m
|
||||
CONFIG_SND_SOC_AC97_CODEC=m
|
||||
# CONFIG_SND_SOC_TAS571X is not set
|
||||
# CONFIG_SND_SUN4I_CODEC is not set
|
||||
# CONFIG_SND_SUN4I_SPDIF is not set
|
||||
# CONFIG_SND_SUN4I_I2S is not set
|
||||
|
||||
CONFIG_INTEL_POWERCLAMP=m
|
||||
CONFIG_X86_PKG_TEMP_THERMAL=m
|
||||
|
|
|
@ -9,14 +9,15 @@ CONFIG_GENERIC_CPU=y
|
|||
CONFIG_X86_UV=y
|
||||
CONFIG_UV_MMTIMER=m
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_ACPI_NUMA=y
|
||||
CONFIG_AMD_NUMA=y
|
||||
CONFIG_X86_64_ACPI_NUMA=y
|
||||
CONFIG_ACPI_NFIT=m
|
||||
# CONFIG_ACPI_NFIT_DEBUG is not set
|
||||
# CONFIG_NUMA_EMU is not set
|
||||
CONFIG_X86_NUMACHIP=y
|
||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
|
||||
|
||||
# https://lists.fedoraproject.org/pipermail/kernel/2013-November/004601.html
|
||||
CONFIG_NR_CPUS=1024
|
||||
|
@ -28,6 +29,7 @@ CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
|
|||
|
||||
CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y
|
||||
|
||||
CONFIG_RANDOMIZE_MEMORY=y
|
||||
# enable the 32-bit entry point for Baytrail
|
||||
CONFIG_EFI_MIXED=y
|
||||
|
||||
|
@ -80,6 +82,8 @@ CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=m
|
|||
CONFIG_CRYPTO_SHA1_SSSE3=m
|
||||
CONFIG_CRYPTO_SHA256_SSSE3=m
|
||||
CONFIG_CRYPTO_SHA512_SSSE3=m
|
||||
CONFIG_CRYPTO_SHA256_MB=m
|
||||
CONFIG_CRYPTO_SHA512_MB=m
|
||||
CONFIG_CRYPTO_BLOWFISH_X86_64=m
|
||||
CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=m
|
||||
CONFIG_CRYPTO_CAMELLIA_X86_64=m
|
||||
|
@ -106,6 +110,7 @@ CONFIG_CRYPTO_CHACHA20_X86_64=m
|
|||
CONFIG_EDAC_AMD64=m
|
||||
# CONFIG_EDAC_AMD64_ERROR_INJECTION is not set
|
||||
CONFIG_EDAC_SBRIDGE=m
|
||||
CONFIG_EDAC_SKX=m
|
||||
|
||||
# CONFIG_PC8736x_GPIO is not set
|
||||
|
||||
|
@ -235,6 +240,3 @@ CONFIG_INFINIBAND_HFI1=m
|
|||
# CONFIG_HFI1_DEBUG_SDMA_ORDER is not set
|
||||
CONFIG_HFI1_VERBS_31BIT_PSN=y
|
||||
# CONFIG_SDMA_VERBOSITY is not set
|
||||
#
|
||||
# Temporary workaround until SND_SOC_INTEL_HASWELL_MACH no longer requires builtin
|
||||
CONFIG_DW_DMAC=y
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
From 3fbd61fbbbfa7ae15cd3f3e2ff7a97e106be2b43 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Anderson <anderson@redhat.com>
|
||||
Date: Tue, 26 Nov 2013 12:42:46 -0500
|
||||
Subject: [PATCH] crash-driver
|
||||
|
@ -29,7 +30,7 @@ Upstream-status: Fedora mustard
|
|||
|
||||
diff --git a/arch/arm/include/asm/crash-driver.h b/arch/arm/include/asm/crash-driver.h
|
||||
new file mode 100644
|
||||
index 000000000000..06e7ae916601
|
||||
index 0000000..06e7ae9
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/include/asm/crash-driver.h
|
||||
@@ -0,0 +1,6 @@
|
||||
|
@ -41,7 +42,7 @@ index 000000000000..06e7ae916601
|
|||
+#endif /* _ARM_CRASH_H */
|
||||
diff --git a/arch/arm64/include/asm/crash-driver.h b/arch/arm64/include/asm/crash-driver.h
|
||||
new file mode 100644
|
||||
index 000000000000..43b26da0c5d6
|
||||
index 0000000..43b26da
|
||||
--- /dev/null
|
||||
+++ b/arch/arm64/include/asm/crash-driver.h
|
||||
@@ -0,0 +1,6 @@
|
||||
|
@ -53,7 +54,7 @@ index 000000000000..43b26da0c5d6
|
|||
+#endif /* _ARM64_CRASH_H */
|
||||
diff --git a/arch/ia64/include/asm/crash-driver.h b/arch/ia64/include/asm/crash-driver.h
|
||||
new file mode 100644
|
||||
index 000000000000..404bcb93c112
|
||||
index 0000000..404bcb9
|
||||
--- /dev/null
|
||||
+++ b/arch/ia64/include/asm/crash-driver.h
|
||||
@@ -0,0 +1,90 @@
|
||||
|
@ -148,7 +149,7 @@ index 000000000000..404bcb93c112
|
|||
+
|
||||
+#endif /* _ASM_IA64_CRASH_H */
|
||||
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
|
||||
index 096731049538..e88887827906 100644
|
||||
index 0967310..e888878 100644
|
||||
--- a/arch/ia64/kernel/ia64_ksyms.c
|
||||
+++ b/arch/ia64/kernel/ia64_ksyms.c
|
||||
@@ -84,6 +84,9 @@ EXPORT_SYMBOL(ia64_save_scratch_fpregs);
|
||||
|
@ -163,7 +164,7 @@ index 096731049538..e88887827906 100644
|
|||
EXPORT_SYMBOL_GPL(esi_call_phys);
|
||||
diff --git a/arch/powerpc/include/asm/crash-driver.h b/arch/powerpc/include/asm/crash-driver.h
|
||||
new file mode 100644
|
||||
index 000000000000..50092d965dc5
|
||||
index 0000000..50092d9
|
||||
--- /dev/null
|
||||
+++ b/arch/powerpc/include/asm/crash-driver.h
|
||||
@@ -0,0 +1,6 @@
|
||||
|
@ -175,7 +176,7 @@ index 000000000000..50092d965dc5
|
|||
+#endif /* _PPC64_CRASH_H */
|
||||
diff --git a/arch/s390/include/asm/crash-driver.h b/arch/s390/include/asm/crash-driver.h
|
||||
new file mode 100644
|
||||
index 000000000000..552be5e2c571
|
||||
index 0000000..552be5e
|
||||
--- /dev/null
|
||||
+++ b/arch/s390/include/asm/crash-driver.h
|
||||
@@ -0,0 +1,60 @@
|
||||
|
@ -240,10 +241,10 @@ index 000000000000..552be5e2c571
|
|||
+
|
||||
+#endif /* _S390_CRASH_H */
|
||||
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c
|
||||
index 8a993a53fcd6..8f511795b52e 100644
|
||||
index 792f9c6..3197995 100644
|
||||
--- a/arch/s390/mm/maccess.c
|
||||
+++ b/arch/s390/mm/maccess.c
|
||||
@@ -197,6 +197,7 @@ void *xlate_dev_mem_ptr(phys_addr_t addr)
|
||||
@@ -201,6 +201,7 @@ void *xlate_dev_mem_ptr(phys_addr_t addr)
|
||||
put_online_cpus();
|
||||
return bounce;
|
||||
}
|
||||
|
@ -251,14 +252,14 @@ index 8a993a53fcd6..8f511795b52e 100644
|
|||
|
||||
/*
|
||||
* Free converted buffer for /dev/mem access (if necessary)
|
||||
@@ -206,3 +207,4 @@ void unxlate_dev_mem_ptr(phys_addr_t addr, void *buf)
|
||||
@@ -210,3 +211,4 @@ void unxlate_dev_mem_ptr(phys_addr_t addr, void *buf)
|
||||
if ((void *) addr != buf)
|
||||
free_page((unsigned long) buf);
|
||||
}
|
||||
+EXPORT_SYMBOL_GPL(unxlate_dev_mem_ptr);
|
||||
diff --git a/arch/x86/include/asm/crash-driver.h b/arch/x86/include/asm/crash-driver.h
|
||||
new file mode 100644
|
||||
index 000000000000..fd4736ec99f5
|
||||
index 0000000..fd4736e
|
||||
--- /dev/null
|
||||
+++ b/arch/x86/include/asm/crash-driver.h
|
||||
@@ -0,0 +1,6 @@
|
||||
|
@ -269,7 +270,7 @@ index 000000000000..fd4736ec99f5
|
|||
+
|
||||
+#endif /* _X86_CRASH_H */
|
||||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
|
||||
index a043107da2af..b272397f306a 100644
|
||||
index fdb8f3e..7dd3a49 100644
|
||||
--- a/drivers/char/Kconfig
|
||||
+++ b/drivers/char/Kconfig
|
||||
@@ -4,6 +4,9 @@
|
||||
|
@ -283,18 +284,18 @@ index a043107da2af..b272397f306a 100644
|
|||
|
||||
config DEVMEM
|
||||
diff --git a/drivers/char/Makefile b/drivers/char/Makefile
|
||||
index d8a7579300d2..31c83630f593 100644
|
||||
index 55d16bf..a40ace9 100644
|
||||
--- a/drivers/char/Makefile
|
||||
+++ b/drivers/char/Makefile
|
||||
@@ -60,3 +60,5 @@ js-rtc-y = rtc.o
|
||||
|
||||
@@ -61,3 +61,5 @@ js-rtc-y = rtc.o
|
||||
obj-$(CONFIG_TILE_SROM) += tile-srom.o
|
||||
obj-$(CONFIG_XILLYBUS) += xillybus/
|
||||
obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o
|
||||
+
|
||||
+obj-$(CONFIG_CRASH) += crash.o
|
||||
diff --git a/drivers/char/crash.c b/drivers/char/crash.c
|
||||
new file mode 100644
|
||||
index 000000000000..085378a1d539
|
||||
index 0000000..085378a
|
||||
--- /dev/null
|
||||
+++ b/drivers/char/crash.c
|
||||
@@ -0,0 +1,128 @@
|
||||
|
@ -428,7 +429,7 @@ index 000000000000..085378a1d539
|
|||
+MODULE_LICENSE("GPL");
|
||||
diff --git a/include/asm-generic/crash-driver.h b/include/asm-generic/crash-driver.h
|
||||
new file mode 100644
|
||||
index 000000000000..25ab9869d566
|
||||
index 0000000..25ab986
|
||||
--- /dev/null
|
||||
+++ b/include/asm-generic/crash-driver.h
|
||||
@@ -0,0 +1,72 @@
|
||||
|
@ -504,3 +505,101 @@ index 000000000000..25ab9869d566
|
|||
+#endif /* __KERNEL__ */
|
||||
+
|
||||
+#endif /* __CRASH_H__ */
|
||||
--
|
||||
2.9.2
|
||||
|
||||
From 7523c19e1d22fbabeaeae9520c16a78202c0eefe Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Tue, 20 Sep 2016 19:39:46 +0200
|
||||
Subject: [PATCH] Update of crash driver to handle CONFIG_HARDENED_USERCOPY and
|
||||
to restrict the supported architectures.
|
||||
|
||||
---
|
||||
drivers/char/Kconfig | 1 +
|
||||
drivers/char/crash.c | 33 ++++++++++++++++++++++++++++++---
|
||||
2 files changed, 31 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
|
||||
index 99b99d5..be6a3ae 100644
|
||||
--- a/drivers/char/Kconfig
|
||||
+++ b/drivers/char/Kconfig
|
||||
@@ -6,6 +6,7 @@ menu "Character devices"
|
||||
|
||||
config CRASH
|
||||
tristate "Crash Utility memory driver"
|
||||
+ depends on X86_32 || X86_64 || ARM || ARM64 || PPC64 || S390
|
||||
|
||||
source "drivers/tty/Kconfig"
|
||||
|
||||
diff --git a/drivers/char/crash.c b/drivers/char/crash.c
|
||||
index 085378a..0258bf8 100644
|
||||
--- a/drivers/char/crash.c
|
||||
+++ b/drivers/char/crash.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <asm/types.h>
|
||||
#include <asm/crash-driver.h>
|
||||
|
||||
-#define CRASH_VERSION "1.0"
|
||||
+#define CRASH_VERSION "1.2"
|
||||
|
||||
/*
|
||||
* These are the file operation functions that allow crash utility
|
||||
@@ -66,6 +66,7 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
|
||||
struct page *page;
|
||||
u64 offset;
|
||||
ssize_t read;
|
||||
+ char *buffer = file->private_data;
|
||||
|
||||
offset = *poff;
|
||||
if (offset >> PAGE_SHIFT != (offset+count-1) >> PAGE_SHIFT)
|
||||
@@ -74,8 +75,12 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
|
||||
vaddr = map_virtual(offset, &page);
|
||||
if (!vaddr)
|
||||
return -EFAULT;
|
||||
-
|
||||
- if (copy_to_user(buf, vaddr, count)) {
|
||||
+ /*
|
||||
+ * Use bounce buffer to bypass the CONFIG_HARDENED_USERCOPY
|
||||
+ * kernel text restriction.
|
||||
+ */
|
||||
+ memcpy(buffer, (char *)vaddr, count);
|
||||
+ if (copy_to_user(buf, buffer, count)) {
|
||||
unmap_virtual(page);
|
||||
return -EFAULT;
|
||||
}
|
||||
@@ -86,10 +91,32 @@ crash_read(struct file *file, char *buf, size_t count, loff_t *poff)
|
||||
return read;
|
||||
}
|
||||
|
||||
+static int
|
||||
+crash_open(struct inode * inode, struct file * filp)
|
||||
+{
|
||||
+ if (!capable(CAP_SYS_RAWIO))
|
||||
+ return -EPERM;
|
||||
+
|
||||
+ filp->private_data = (void *)__get_free_page(GFP_KERNEL);
|
||||
+ if (!filp->private_data)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+crash_release(struct inode *inode, struct file *filp)
|
||||
+{
|
||||
+ free_pages((unsigned long)filp->private_data, 0);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static struct file_operations crash_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.llseek = crash_llseek,
|
||||
.read = crash_read,
|
||||
+ .open = crash_open,
|
||||
+ .release = crash_release,
|
||||
};
|
||||
|
||||
static struct miscdevice crash_dev = {
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
From 78bd7226c92c8309d1c6c1378f1224dcd591b49f Mon Sep 17 00:00:00 2001
|
||||
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
||||
Date: Fri, 22 Jan 2016 13:03:36 -0600
|
||||
Subject: [PATCH] Make ZONE_DMA not depend on CONFIG_EXPERT
|
||||
|
||||
Disable the requirement on CONFIG_EXPERT for ZONE_DMA and ZONE_DEVICE so
|
||||
that we can enable NVDIMM_PFN and ND_PFN
|
||||
|
||||
Signed-off-by: Justin Forbes <jforbes@fedoraproject.org>
|
||||
---
|
||||
arch/x86/Kconfig | 2 +-
|
||||
mm/Kconfig | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
|
||||
index 3c74b549ea9a..8a5b7b8cc425 100644
|
||||
--- a/arch/x86/Kconfig
|
||||
+++ b/arch/x86/Kconfig
|
||||
@@ -318,7 +318,7 @@ source "kernel/Kconfig.freezer"
|
||||
menu "Processor type and features"
|
||||
|
||||
config ZONE_DMA
|
||||
- bool "DMA memory allocation support" if EXPERT
|
||||
+ bool "DMA memory allocation support"
|
||||
default y
|
||||
help
|
||||
DMA memory allocation support allows devices with less than 32-bit
|
||||
diff --git a/mm/Kconfig b/mm/Kconfig
|
||||
index 05efa6a5199e..c1a01e50c293 100644
|
||||
--- a/mm/Kconfig
|
||||
+++ b/mm/Kconfig
|
||||
@@ -650,7 +650,7 @@ config IDLE_PAGE_TRACKING
|
||||
See Documentation/vm/idle_page_tracking.txt for more details.
|
||||
|
||||
config ZONE_DEVICE
|
||||
- bool "Device memory (pmem, etc...) hotplug support" if EXPERT
|
||||
+ bool "Device memory (pmem, etc...) hotplug support"
|
||||
depends on MEMORY_HOTPLUG
|
||||
depends on MEMORY_HOTREMOVE
|
||||
depends on SPARSEMEM_VMEMMAP
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
From 61d19a658598b2d3ea80a5a02a59d9ea0ff08ce6 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@redhat.com>
|
||||
Date: Mon, 3 Oct 2016 19:43:03 +0200
|
||||
Subject: [PATCH] drm: virtio: reinstate drm_virtio_set_busid()
|
||||
|
||||
Before commit a325725633c2 ("drm: Lobotomize set_busid nonsense for !pci
|
||||
drivers"), several DRM drivers for platform devices used to expose an
|
||||
explicit "drm_driver.set_busid" callback, invariably backed by
|
||||
drm_platform_set_busid().
|
||||
|
||||
Commit a325725633c2 removed drm_platform_set_busid(), along with the
|
||||
referring .set_busid field initializations. This was justified because
|
||||
interchangeable functionality had been implemented in drm_dev_alloc() /
|
||||
drm_dev_init(), which DRM_IOCTL_SET_VERSION would rely on going forward.
|
||||
|
||||
However, commit a325725633c2 also removed drm_virtio_set_busid(), for
|
||||
which the same consolidation was not appropriate: this .set_busid callback
|
||||
had been implemented with drm_pci_set_busid(), and not
|
||||
drm_platform_set_busid(). The error regressed Xorg/xserver on QEMU's
|
||||
"virtio-vga" card; the drmGetBusid() function from libdrm would no longer
|
||||
return stable PCI identifiers like "pci:0000:00:02.0", but rather unstable
|
||||
platform ones like "virtio0".
|
||||
|
||||
Reinstate drm_virtio_set_busid() with judicious use of
|
||||
|
||||
git checkout -p a325725633c2^ -- drivers/gpu/drm/virtio
|
||||
|
||||
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
|
||||
Cc: Daniel Vetter <daniel.vetter@intel.com>
|
||||
Cc: David Airlie <airlied@redhat.com>
|
||||
Cc: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
Cc: Gerd Hoffmann <kraxel@redhat.com>
|
||||
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
|
||||
Cc: Hans de Goede <hdegoede@redhat.com>
|
||||
Cc: Joachim Frieben <jfrieben@hotmail.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Reported-by: Joachim Frieben <jfrieben@hotmail.com>
|
||||
Fixes: a325725633c26aa66ab940f762a6b0778edf76c0
|
||||
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1366842
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
||||
---
|
||||
drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 10 ++++++++++
|
||||
drivers/gpu/drm/virtio/virtgpu_drv.c | 1 +
|
||||
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 +
|
||||
3 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
|
||||
index 7f0e93f87a55..88a39165edd5 100644
|
||||
--- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
|
||||
+++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c
|
||||
@@ -27,6 +27,16 @@
|
||||
|
||||
#include "virtgpu_drv.h"
|
||||
|
||||
+int drm_virtio_set_busid(struct drm_device *dev, struct drm_master *master)
|
||||
+{
|
||||
+ struct pci_dev *pdev = dev->pdev;
|
||||
+
|
||||
+ if (pdev) {
|
||||
+ return drm_pci_set_busid(dev, master);
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev)
|
||||
{
|
||||
struct apertures_struct *ap;
|
||||
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
|
||||
index c13f70cfc461..5820b7020ae5 100644
|
||||
--- a/drivers/gpu/drm/virtio/virtgpu_drv.c
|
||||
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
|
||||
@@ -117,6 +117,7 @@ static const struct file_operations virtio_gpu_driver_fops = {
|
||||
|
||||
static struct drm_driver driver = {
|
||||
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | DRIVER_RENDER | DRIVER_ATOMIC,
|
||||
+ .set_busid = drm_virtio_set_busid,
|
||||
.load = virtio_gpu_driver_load,
|
||||
.unload = virtio_gpu_driver_unload,
|
||||
.open = virtio_gpu_driver_open,
|
||||
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
|
||||
index b18ef3111f0c..acf556a35cb2 100644
|
||||
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
|
||||
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
|
||||
@@ -49,6 +49,7 @@
|
||||
#define DRIVER_PATCHLEVEL 1
|
||||
|
||||
/* virtgpu_drm_bus.c */
|
||||
+int drm_virtio_set_busid(struct drm_device *dev, struct drm_master *master);
|
||||
int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev);
|
||||
|
||||
struct virtio_gpu_object {
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From c01ff700ea4192ae04b306fef725d62189550236 Mon Sep 17 00:00:00 2001
|
||||
From 04e65e01058ed6357b932e64b19e4bf762f04970 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Tue, 27 Aug 2013 13:33:03 -0400
|
||||
Subject: [PATCH 13/20] efi: Add EFI_SECURE_BOOT bit
|
||||
Subject: [PATCH 2/9] efi: Add EFI_SECURE_BOOT bit
|
||||
|
||||
UEFI machines can be booted in Secure Boot mode. Add a EFI_SECURE_BOOT bit
|
||||
for use with efi_enabled.
|
||||
|
@ -13,10 +13,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
|||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
|
||||
index f3b804f..a401ff8 100644
|
||||
index bdb9881c7afd..a666b6c29c77 100644
|
||||
--- a/arch/x86/kernel/setup.c
|
||||
+++ b/arch/x86/kernel/setup.c
|
||||
@@ -1145,7 +1145,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
@@ -1154,7 +1154,9 @@ void __init setup_arch(char **cmdline_p)
|
||||
|
||||
#ifdef CONFIG_EFI_SECURE_BOOT_SIG_ENFORCE
|
||||
if (boot_params.secure_boot) {
|
||||
|
@ -27,10 +27,10 @@ index f3b804f..a401ff8 100644
|
|||
#endif
|
||||
|
||||
diff --git a/include/linux/efi.h b/include/linux/efi.h
|
||||
index 569b5a8..4dc970e 100644
|
||||
index c2db3ca22217..8cb38cfcba74 100644
|
||||
--- a/include/linux/efi.h
|
||||
+++ b/include/linux/efi.h
|
||||
@@ -980,6 +980,7 @@ extern int __init efi_setup_pcdp_console(char *);
|
||||
@@ -1062,6 +1062,7 @@ extern int __init efi_setup_pcdp_console(char *);
|
||||
#define EFI_ARCH_1 7 /* First arch-specific bit */
|
||||
#define EFI_DBG 8 /* Print additional debug info at runtime */
|
||||
#define EFI_NX_PE_DATA 9 /* Can runtime data regions be mapped non-executable? */
|
||||
|
@ -39,5 +39,5 @@ index 569b5a8..4dc970e 100644
|
|||
#ifdef CONFIG_EFI
|
||||
/*
|
||||
--
|
||||
2.5.0
|
||||
2.5.5
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 9ef94251448aa463c5937ee8e8e27d6fd9529509 Mon Sep 17 00:00:00 2001
|
||||
From 0a5c52b9eb4918fb2bee43bacc3521b574334cff Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Tue, 5 Feb 2013 19:25:05 -0500
|
||||
Subject: [PATCH 11/20] efi: Disable secure boot if shim is in insecure mode
|
||||
Subject: [PATCH 1/9] efi: Disable secure boot if shim is in insecure mode
|
||||
|
||||
A user can manually tell the shim boot loader to disable validation of
|
||||
images it loads. When a user does this, it creates a UEFI variable called
|
||||
|
@ -15,10 +15,10 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
|||
1 file changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
|
||||
index b4de3faa3f29..5cc2ef570390 100644
|
||||
index 6b8b9a775b46..b3a5364d31c6 100644
|
||||
--- a/arch/x86/boot/compressed/eboot.c
|
||||
+++ b/arch/x86/boot/compressed/eboot.c
|
||||
@@ -830,8 +830,9 @@ out:
|
||||
@@ -574,8 +574,9 @@ free_handle:
|
||||
|
||||
static int get_secure_boot(void)
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ index b4de3faa3f29..5cc2ef570390 100644
|
|||
efi_guid_t var_guid = EFI_GLOBAL_VARIABLE_GUID;
|
||||
efi_status_t status;
|
||||
|
||||
@@ -855,6 +856,23 @@ static int get_secure_boot(void)
|
||||
@@ -599,6 +600,23 @@ static int get_secure_boot(void)
|
||||
if (setup == 1)
|
||||
return 0;
|
||||
|
||||
|
@ -54,5 +54,5 @@ index b4de3faa3f29..5cc2ef570390 100644
|
|||
}
|
||||
|
||||
--
|
||||
2.4.3
|
||||
2.5.5
|
||||
|
||||
|
|
2
gitrev
2
gitrev
|
@ -1 +1 @@
|
|||
f2c1242194c7af9b26f53359ab2b23df36d3a643
|
||||
c8d2bc9bc39ebea8437fd974fdbc21847bb897a3
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 51abecb00c48941cc3db19701cc73e65082924bb Mon Sep 17 00:00:00 2001
|
||||
From e07815cf02eadb245fa60359133b122f9ffe9045 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Fri, 20 Jun 2014 08:53:24 -0400
|
||||
Subject: [PATCH 14/20] hibernate: Disable in a signed modules environment
|
||||
Subject: [PATCH 3/9] hibernate: Disable in a signed modules environment
|
||||
|
||||
There is currently no way to verify the resume image when returning
|
||||
from hibernate. This might compromise the signed modules trust model,
|
||||
|
@ -14,7 +14,7 @@ Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
|||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
|
||||
index 690f78f210f2..037303a1cba9 100644
|
||||
index fca9254280ee..ffd8644078b2 100644
|
||||
--- a/kernel/power/hibernate.c
|
||||
+++ b/kernel/power/hibernate.c
|
||||
@@ -29,6 +29,7 @@
|
||||
|
@ -35,5 +35,5 @@ index 690f78f210f2..037303a1cba9 100644
|
|||
|
||||
/**
|
||||
--
|
||||
2.4.3
|
||||
2.5.5
|
||||
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
From 14b627c610f93c2700f9a3825ac10c35d51acfe4 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
Date: Mon, 7 Dec 2015 13:50:38 -0500
|
||||
Subject: [PATCH] ideapad-laptop: Add Lenovo ideapad Y700-17ISK to no_hw_rfkill
|
||||
dmi list
|
||||
|
||||
One of the newest ideapad models also lacks a physical hw rfkill switch,
|
||||
and trying to read the hw rfkill switch through the ideapad module
|
||||
causes it to always reported blocking breaking wifi.
|
||||
|
||||
Fix it by adding this model to the DMI list.
|
||||
|
||||
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1286293
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
|
||||
---
|
||||
drivers/platform/x86/ideapad-laptop.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
|
||||
index a313dfc0245f..d28db0e793df 100644
|
||||
--- a/drivers/platform/x86/ideapad-laptop.c
|
||||
+++ b/drivers/platform/x86/ideapad-laptop.c
|
||||
@@ -865,6 +865,13 @@ static const struct dmi_system_id no_hw_rfkill_list[] = {
|
||||
},
|
||||
},
|
||||
{
|
||||
+ .ident = "Lenovo ideapad Y700-17ISK",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad Y700-17ISK"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
.ident = "Lenovo Yoga 2 11 / 13 / Pro",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -42,8 +42,8 @@ index 6abffb7..7b103bb 100644
|
|||
|
||||
# actual build commands
|
||||
quiet_cmd_vdso32ld = VDSO32L $@
|
||||
- cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@
|
||||
+ cmd_vdso32ld = $(CROSS32CC) $(c_flags) -Wl,-T $^ -o $@ \
|
||||
- cmd_vdso32ld = $(CROSS32CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^)
|
||||
+ cmd_vdso32ld = $(CROSS32CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) \
|
||||
+ $(if $(AFTER_LINK),; $(AFTER_LINK))
|
||||
quiet_cmd_vdso32as = VDSO32A $@
|
||||
cmd_vdso32as = $(CROSS32CC) $(a_flags) -c -o $@ $<
|
||||
|
@ -56,8 +56,8 @@ index 8c8f2ae..a743ebe 100644
|
|||
|
||||
# actual build commands
|
||||
quiet_cmd_vdso64ld = VDSO64L $@
|
||||
- cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@
|
||||
+ cmd_vdso64ld = $(CC) $(c_flags) -Wl,-T $^ -o $@ \
|
||||
- cmd_vdso64ld = $(CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^)
|
||||
+ cmd_vdso64ld = $(CC) $(c_flags) -o $@ -Wl,-T$(filter %.lds,$^) $(filter %.o,$^) \
|
||||
+ $(if $(AFTER_LINK),; $(AFTER_LINK))
|
||||
quiet_cmd_vdso64as = VDSO64A $@
|
||||
cmd_vdso64as = $(CC) $(a_flags) -c -o $@ $<
|
||||
|
|
896
kernel.spec
896
kernel.spec
File diff suppressed because it is too large
Load Diff
BIN
linux-4.4.tar.xz
BIN
linux-4.4.tar.xz
Binary file not shown.
BIN
patch-4.7-pf4.xz
BIN
patch-4.7-pf4.xz
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,59 @@
|
|||
From edc7986d4d405daebaf2f66269b353da579fce5f Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Covington <cov@codeaurora.org>
|
||||
Date: Tue, 31 May 2016 16:19:02 -0400
|
||||
Subject: arm64: Workaround for QDF2432 ID_AA64 SR accesses
|
||||
|
||||
The ARMv8.0 architecture reserves several system register encodings for
|
||||
future use. These encodings should behave as read-only and always return
|
||||
zero on a read. As described in Errata 94, the CPU cores in the QDF2432
|
||||
errantly cause an instruction abort if an AArch64 MRS instruction attempts
|
||||
to read any of the following system register encodings:
|
||||
|
||||
Op0, Op1, CRn, CRm, Op2
|
||||
3, 0, C0, [C4-C7], [2-3, 6-7]
|
||||
3, 0, C0, C3, [3-7]
|
||||
3, 0, C0, [C4,C6,C7], [4-5]
|
||||
3, 0, C0, C2, [6-7]
|
||||
|
||||
Naively projecting ARMv8.0 names, this space includes:
|
||||
|
||||
ID_AA64PFR[2-7]_EL1
|
||||
ID_AA64DFR[2-3]_EL1
|
||||
ID_AA64AFR[2-3]_EL1
|
||||
ID_AA64ISAR[2-7]_EL1
|
||||
ID_AA64MMFR[2-7]_EL1
|
||||
|
||||
As of v4.8-rc2, Linux only attempts to query one register in this space,
|
||||
ID_AA64MMFR2_EL1. As simple workaround, skip that access when the affected
|
||||
MIDR is detected.
|
||||
|
||||
Signed-off-by: Christopher Covington <cov@codeaurora.org>
|
||||
---
|
||||
arch/arm64/kernel/cpuinfo.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c
|
||||
index ed1b84f..790de6b 100644
|
||||
--- a/arch/arm64/kernel/cpuinfo.c
|
||||
+++ b/arch/arm64/kernel/cpuinfo.c
|
||||
@@ -325,6 +325,8 @@ static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
|
||||
|
||||
static void __cpuinfo_store_cpu(struct cpuinfo_arm64 *info)
|
||||
{
|
||||
+ bool qdf2432_cpu = read_cpuid_id() == 0x510f2811;
|
||||
+
|
||||
info->reg_cntfrq = arch_timer_get_cntfrq();
|
||||
info->reg_ctr = read_cpuid_cachetype();
|
||||
info->reg_dczid = read_cpuid(DCZID_EL0);
|
||||
@@ -337,7 +339,7 @@ static void __cpuinfo_store_cpu(struct cpuinfo_arm64 *info)
|
||||
info->reg_id_aa64isar1 = read_cpuid(ID_AA64ISAR1_EL1);
|
||||
info->reg_id_aa64mmfr0 = read_cpuid(ID_AA64MMFR0_EL1);
|
||||
info->reg_id_aa64mmfr1 = read_cpuid(ID_AA64MMFR1_EL1);
|
||||
- info->reg_id_aa64mmfr2 = read_cpuid(ID_AA64MMFR2_EL1);
|
||||
+ info->reg_id_aa64mmfr2 = qdf2432_cpu ? 0 : read_cpuid(ID_AA64MMFR2_EL1);
|
||||
info->reg_id_aa64pfr0 = read_cpuid(ID_AA64PFR0_EL1);
|
||||
info->reg_id_aa64pfr1 = read_cpuid(ID_AA64PFR1_EL1);
|
||||
|
||||
--
|
||||
cgit v0.12
|
||||
|
|
@ -0,0 +1,439 @@
|
|||
From 92777b4dfc3920edb449d0be6ead65d8460653cc Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Tue, 12 May 2015 12:51:18 -0400
|
||||
Subject: [PATCH] drm/qxl: reapply cursor after SetCrtc calls
|
||||
|
||||
The qxl driver currently destroys and recreates the
|
||||
qxl "primary" any time the first crtc is set.
|
||||
|
||||
A side-effect of destroying the primary is mouse state
|
||||
associated with the crtc is lost, which leads to
|
||||
disappearing mouse cursors on wayland sessions.
|
||||
|
||||
This commit changes the driver to reapply the cursor
|
||||
any time SetCrtc is called. It achieves this by keeping
|
||||
a copy of the cursor data on the qxl_crtc struct.
|
||||
|
||||
Signed-off-by: Ray Strode <rstrode@redhat.com>
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1200901
|
||||
---
|
||||
drivers/gpu/drm/qxl/qxl_display.c | 98 +++++++++++++++++++++++++++++++++++++++
|
||||
drivers/gpu/drm/qxl/qxl_drv.h | 1 +
|
||||
2 files changed, 99 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
|
||||
index 3aef127..34ab444 100644
|
||||
--- a/drivers/gpu/drm/qxl/qxl_display.c
|
||||
+++ b/drivers/gpu/drm/qxl/qxl_display.c
|
||||
@@ -184,60 +184,61 @@ static struct mode_size {
|
||||
{1440, 900},
|
||||
{1400, 1050},
|
||||
{1680, 1050},
|
||||
{1600, 1200},
|
||||
{1920, 1080},
|
||||
{1920, 1200}
|
||||
};
|
||||
|
||||
static int qxl_add_common_modes(struct drm_connector *connector,
|
||||
unsigned pwidth,
|
||||
unsigned pheight)
|
||||
{
|
||||
struct drm_device *dev = connector->dev;
|
||||
struct drm_display_mode *mode = NULL;
|
||||
int i;
|
||||
for (i = 0; i < ARRAY_SIZE(common_modes); i++) {
|
||||
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h,
|
||||
60, false, false, false);
|
||||
if (common_modes[i].w == pwidth && common_modes[i].h == pheight)
|
||||
mode->type |= DRM_MODE_TYPE_PREFERRED;
|
||||
drm_mode_probed_add(connector, mode);
|
||||
}
|
||||
return i - 1;
|
||||
}
|
||||
|
||||
static void qxl_crtc_destroy(struct drm_crtc *crtc)
|
||||
{
|
||||
struct qxl_crtc *qxl_crtc = to_qxl_crtc(crtc);
|
||||
|
||||
drm_crtc_cleanup(crtc);
|
||||
+ kfree(qxl_crtc->cursor);
|
||||
kfree(qxl_crtc);
|
||||
}
|
||||
|
||||
static int qxl_crtc_page_flip(struct drm_crtc *crtc,
|
||||
struct drm_framebuffer *fb,
|
||||
struct drm_pending_vblank_event *event,
|
||||
uint32_t page_flip_flags)
|
||||
{
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct qxl_device *qdev = dev->dev_private;
|
||||
struct qxl_framebuffer *qfb_src = to_qxl_framebuffer(fb);
|
||||
struct qxl_framebuffer *qfb_old = to_qxl_framebuffer(crtc->primary->fb);
|
||||
struct qxl_bo *bo_old = gem_to_qxl_bo(qfb_old->obj);
|
||||
struct qxl_bo *bo = gem_to_qxl_bo(qfb_src->obj);
|
||||
unsigned long flags;
|
||||
struct drm_clip_rect norect = {
|
||||
.x1 = 0,
|
||||
.y1 = 0,
|
||||
.x2 = fb->width,
|
||||
.y2 = fb->height
|
||||
};
|
||||
int inc = 1;
|
||||
int one_clip_rect = 1;
|
||||
int ret = 0;
|
||||
|
||||
crtc->primary->fb = fb;
|
||||
bo_old->is_primary = false;
|
||||
bo->is_primary = true;
|
||||
|
||||
ret = qxl_bo_reserve(bo, false);
|
||||
@@ -269,60 +270,145 @@ static int qxl_crtc_page_flip(struct drm_crtc *crtc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
qxl_hide_cursor(struct qxl_device *qdev)
|
||||
{
|
||||
struct qxl_release *release;
|
||||
struct qxl_cursor_cmd *cmd;
|
||||
int ret;
|
||||
|
||||
ret = qxl_alloc_release_reserved(qdev, sizeof(*cmd), QXL_RELEASE_CURSOR_CMD,
|
||||
&release, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = qxl_release_reserve_list(release, true);
|
||||
if (ret) {
|
||||
qxl_release_free(qdev, release);
|
||||
return ret;
|
||||
}
|
||||
|
||||
cmd = (struct qxl_cursor_cmd *)qxl_release_map(qdev, release);
|
||||
cmd->type = QXL_CURSOR_HIDE;
|
||||
qxl_release_unmap(qdev, release, &cmd->release_info);
|
||||
|
||||
qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int qxl_crtc_stash_cursor(struct drm_crtc *crtc,
|
||||
+ struct qxl_cursor *cursor)
|
||||
+{
|
||||
+ struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
|
||||
+ size_t cursor_size;
|
||||
+
|
||||
+ cursor_size = sizeof(struct qxl_cursor) + cursor->data_size;
|
||||
+
|
||||
+ if (!qcrtc->cursor || qcrtc->cursor->data_size != cursor->data_size) {
|
||||
+ kfree(qcrtc->cursor);
|
||||
+ qcrtc->cursor = kmalloc(cursor_size, GFP_KERNEL);
|
||||
+
|
||||
+ if (!qcrtc->cursor)
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ memcpy(qcrtc->cursor, cursor, cursor_size);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int qxl_crtc_apply_cursor(struct drm_crtc *crtc)
|
||||
+{
|
||||
+ struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
|
||||
+ struct drm_device *dev = crtc->dev;
|
||||
+ struct qxl_device *qdev = dev->dev_private;
|
||||
+ struct qxl_cursor *cursor;
|
||||
+ struct qxl_cursor_cmd *cmd;
|
||||
+ struct qxl_bo *cursor_bo;
|
||||
+ struct qxl_release *release;
|
||||
+ size_t cursor_size;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ if (!qcrtc->cursor)
|
||||
+ return 0;
|
||||
+
|
||||
+ cursor_size = sizeof(*qcrtc->cursor) + qcrtc->cursor->data_size;
|
||||
+
|
||||
+ ret = qxl_alloc_release_reserved(qdev, sizeof(*cmd),
|
||||
+ QXL_RELEASE_CURSOR_CMD,
|
||||
+ &release, NULL);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ ret = qxl_alloc_bo_reserved(qdev, release, cursor_size, &cursor_bo);
|
||||
+ if (ret)
|
||||
+ goto out_free_release;
|
||||
+
|
||||
+ ret = qxl_release_reserve_list(release, false);
|
||||
+ if (ret)
|
||||
+ goto out_free_bo;
|
||||
+
|
||||
+ ret = qxl_bo_kmap(cursor_bo, (void **)&cursor);
|
||||
+ if (ret)
|
||||
+ goto out_backoff;
|
||||
+
|
||||
+ memcpy(cursor, qcrtc->cursor, cursor_size);
|
||||
+
|
||||
+ qxl_bo_kunmap(cursor_bo);
|
||||
+
|
||||
+ cmd = (struct qxl_cursor_cmd *)qxl_release_map(qdev, release);
|
||||
+ cmd->type = QXL_CURSOR_SET;
|
||||
+ cmd->u.set.position.x = qcrtc->cur_x + qcrtc->hot_spot_x;
|
||||
+ cmd->u.set.position.y = qcrtc->cur_y + qcrtc->hot_spot_y;
|
||||
+
|
||||
+ cmd->u.set.shape = qxl_bo_physical_address(qdev, cursor_bo, 0);
|
||||
+
|
||||
+ cmd->u.set.visible = 1;
|
||||
+ qxl_release_unmap(qdev, release, &cmd->release_info);
|
||||
+
|
||||
+ qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
+ qxl_release_fence_buffer_objects(release);
|
||||
+ qxl_bo_unref(&cursor_bo);
|
||||
+
|
||||
+ return ret;
|
||||
+
|
||||
+out_backoff:
|
||||
+ qxl_release_backoff_reserve_list(release);
|
||||
+out_free_bo:
|
||||
+ qxl_bo_unref(&cursor_bo);
|
||||
+out_free_release:
|
||||
+ qxl_release_free(qdev, release);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int qxl_crtc_cursor_set2(struct drm_crtc *crtc,
|
||||
struct drm_file *file_priv,
|
||||
uint32_t handle,
|
||||
uint32_t width,
|
||||
uint32_t height, int32_t hot_x, int32_t hot_y)
|
||||
{
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct qxl_device *qdev = dev->dev_private;
|
||||
struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
|
||||
struct drm_gem_object *obj;
|
||||
struct qxl_cursor *cursor;
|
||||
struct qxl_cursor_cmd *cmd;
|
||||
struct qxl_bo *cursor_bo, *user_bo;
|
||||
struct qxl_release *release;
|
||||
void *user_ptr;
|
||||
|
||||
int size = 64*64*4;
|
||||
int ret = 0;
|
||||
if (!handle)
|
||||
return qxl_hide_cursor(qdev);
|
||||
|
||||
obj = drm_gem_object_lookup(file_priv, handle);
|
||||
if (!obj) {
|
||||
DRM_ERROR("cannot find cursor object\n");
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
user_bo = gem_to_qxl_bo(obj);
|
||||
|
||||
ret = qxl_bo_reserve(user_bo, false);
|
||||
@@ -343,60 +429,66 @@ static int qxl_crtc_cursor_set2(struct drm_crtc *crtc,
|
||||
&release, NULL);
|
||||
if (ret)
|
||||
goto out_kunmap;
|
||||
|
||||
ret = qxl_alloc_bo_reserved(qdev, release, sizeof(struct qxl_cursor) + size,
|
||||
&cursor_bo);
|
||||
if (ret)
|
||||
goto out_free_release;
|
||||
|
||||
ret = qxl_release_reserve_list(release, false);
|
||||
if (ret)
|
||||
goto out_free_bo;
|
||||
|
||||
ret = qxl_bo_kmap(cursor_bo, (void **)&cursor);
|
||||
if (ret)
|
||||
goto out_backoff;
|
||||
|
||||
cursor->header.unique = 0;
|
||||
cursor->header.type = SPICE_CURSOR_TYPE_ALPHA;
|
||||
cursor->header.width = 64;
|
||||
cursor->header.height = 64;
|
||||
cursor->header.hot_spot_x = hot_x;
|
||||
cursor->header.hot_spot_y = hot_y;
|
||||
cursor->data_size = size;
|
||||
cursor->chunk.next_chunk = 0;
|
||||
cursor->chunk.prev_chunk = 0;
|
||||
cursor->chunk.data_size = size;
|
||||
|
||||
memcpy(cursor->chunk.data, user_ptr, size);
|
||||
|
||||
+ ret = qxl_crtc_stash_cursor(crtc, cursor);
|
||||
+ if (ret) {
|
||||
+ DRM_ERROR("cannot save cursor, may be lost on next mode set\n");
|
||||
+ ret = 0;
|
||||
+ }
|
||||
+
|
||||
qxl_bo_kunmap(cursor_bo);
|
||||
|
||||
qxl_bo_kunmap(user_bo);
|
||||
|
||||
qcrtc->cur_x += qcrtc->hot_spot_x - hot_x;
|
||||
qcrtc->cur_y += qcrtc->hot_spot_y - hot_y;
|
||||
qcrtc->hot_spot_x = hot_x;
|
||||
qcrtc->hot_spot_y = hot_y;
|
||||
|
||||
cmd = (struct qxl_cursor_cmd *)qxl_release_map(qdev, release);
|
||||
cmd->type = QXL_CURSOR_SET;
|
||||
cmd->u.set.position.x = qcrtc->cur_x + qcrtc->hot_spot_x;
|
||||
cmd->u.set.position.y = qcrtc->cur_y + qcrtc->hot_spot_y;
|
||||
|
||||
cmd->u.set.shape = qxl_bo_physical_address(qdev, cursor_bo, 0);
|
||||
|
||||
cmd->u.set.visible = 1;
|
||||
qxl_release_unmap(qdev, release, &cmd->release_info);
|
||||
|
||||
qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false);
|
||||
qxl_release_fence_buffer_objects(release);
|
||||
|
||||
/* finish with the userspace bo */
|
||||
ret = qxl_bo_reserve(user_bo, false);
|
||||
if (!ret) {
|
||||
qxl_bo_unpin(user_bo);
|
||||
qxl_bo_unreserve(user_bo);
|
||||
}
|
||||
drm_gem_object_unreference_unlocked(obj);
|
||||
|
||||
@@ -628,60 +720,66 @@ static int qxl_crtc_mode_set(struct drm_crtc *crtc,
|
||||
x, y,
|
||||
mode->hdisplay, mode->vdisplay,
|
||||
adjusted_mode->hdisplay,
|
||||
adjusted_mode->vdisplay);
|
||||
|
||||
if (bo->is_primary == false)
|
||||
recreate_primary = true;
|
||||
|
||||
if (bo->surf.stride * bo->surf.height > qdev->vram_size) {
|
||||
DRM_ERROR("Mode doesn't fit in vram size (vgamem)");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = qxl_bo_reserve(bo, false);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
ret = qxl_bo_pin(bo, bo->type, NULL);
|
||||
if (ret != 0) {
|
||||
qxl_bo_unreserve(bo);
|
||||
return -EINVAL;
|
||||
}
|
||||
qxl_bo_unreserve(bo);
|
||||
if (recreate_primary) {
|
||||
qxl_io_destroy_primary(qdev);
|
||||
qxl_io_log(qdev,
|
||||
"recreate primary: %dx%d,%d,%d\n",
|
||||
bo->surf.width, bo->surf.height,
|
||||
bo->surf.stride, bo->surf.format);
|
||||
qxl_io_create_primary(qdev, 0, bo);
|
||||
bo->is_primary = true;
|
||||
+
|
||||
+ ret = qxl_crtc_apply_cursor(crtc);
|
||||
+ if (ret) {
|
||||
+ DRM_ERROR("could not set cursor after modeset");
|
||||
+ ret = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (bo->is_primary) {
|
||||
DRM_DEBUG_KMS("setting surface_id to 0 for primary surface %d on crtc %d\n", bo->surface_id, qcrtc->index);
|
||||
surf_id = 0;
|
||||
} else {
|
||||
surf_id = bo->surface_id;
|
||||
}
|
||||
|
||||
if (old_bo && old_bo != bo) {
|
||||
old_bo->is_primary = false;
|
||||
ret = qxl_bo_reserve(old_bo, false);
|
||||
qxl_bo_unpin(old_bo);
|
||||
qxl_bo_unreserve(old_bo);
|
||||
}
|
||||
|
||||
qxl_monitors_config_set(qdev, qcrtc->index, x, y,
|
||||
mode->hdisplay,
|
||||
mode->vdisplay, surf_id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void qxl_crtc_prepare(struct drm_crtc *crtc)
|
||||
{
|
||||
DRM_DEBUG("current: %dx%d+%d+%d (%d).\n",
|
||||
crtc->mode.hdisplay, crtc->mode.vdisplay,
|
||||
crtc->x, crtc->y, crtc->enabled);
|
||||
}
|
||||
|
||||
static void qxl_crtc_commit(struct drm_crtc *crtc)
|
||||
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
|
||||
index 8e633ca..6b63c54 100644
|
||||
--- a/drivers/gpu/drm/qxl/qxl_drv.h
|
||||
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
|
||||
@@ -110,60 +110,61 @@ struct qxl_bo {
|
||||
void *kptr;
|
||||
int type;
|
||||
|
||||
/* Constant after initialization */
|
||||
struct drm_gem_object gem_base;
|
||||
bool is_primary; /* is this now a primary surface */
|
||||
bool hw_surf_alloc;
|
||||
struct qxl_surface surf;
|
||||
uint32_t surface_id;
|
||||
struct qxl_release *surf_create;
|
||||
};
|
||||
#define gem_to_qxl_bo(gobj) container_of((gobj), struct qxl_bo, gem_base)
|
||||
#define to_qxl_bo(tobj) container_of((tobj), struct qxl_bo, tbo)
|
||||
|
||||
struct qxl_gem {
|
||||
struct mutex mutex;
|
||||
struct list_head objects;
|
||||
};
|
||||
|
||||
struct qxl_bo_list {
|
||||
struct ttm_validate_buffer tv;
|
||||
};
|
||||
|
||||
struct qxl_crtc {
|
||||
struct drm_crtc base;
|
||||
int index;
|
||||
int cur_x;
|
||||
int cur_y;
|
||||
int hot_spot_x;
|
||||
int hot_spot_y;
|
||||
+ struct qxl_cursor *cursor;
|
||||
};
|
||||
|
||||
struct qxl_output {
|
||||
int index;
|
||||
struct drm_connector base;
|
||||
struct drm_encoder enc;
|
||||
};
|
||||
|
||||
struct qxl_framebuffer {
|
||||
struct drm_framebuffer base;
|
||||
struct drm_gem_object *obj;
|
||||
};
|
||||
|
||||
#define to_qxl_crtc(x) container_of(x, struct qxl_crtc, base)
|
||||
#define drm_connector_to_qxl_output(x) container_of(x, struct qxl_output, base)
|
||||
#define drm_encoder_to_qxl_output(x) container_of(x, struct qxl_output, enc)
|
||||
#define to_qxl_framebuffer(x) container_of(x, struct qxl_framebuffer, base)
|
||||
|
||||
struct qxl_mman {
|
||||
struct ttm_bo_global_ref bo_global_ref;
|
||||
struct drm_global_reference mem_global_ref;
|
||||
bool mem_global_referenced;
|
||||
struct ttm_bo_device bdev;
|
||||
};
|
||||
|
||||
struct qxl_mode_info {
|
||||
int num_modes;
|
||||
struct qxl_mode *modes;
|
||||
bool mode_config_initialized;
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,9 +1,13 @@
|
|||
Linux 4.8 rebase notes:
|
||||
- Make sure you apply drm-i915-turn-off-wc-mmaps.patch for F23
|
||||
- Check on status of qxl-reapply-cursor-after-SetCrtc-calls.patch
|
||||
|
||||
Linux 4.6 rebase notes:
|
||||
|
||||
- Check on status of drm-i915-turn-off-wc-mmaps.patch (Should be okay to remove in F24, but not F22 or F23)
|
||||
- Check on status of CONFIG_DW_DMAC_CORE
|
||||
|
||||
Linux 4.5 rebase notes:
|
||||
|
||||
- Check on status of drm-i915-turn-off-wc-mmaps.patch (Should be okay to remove in F24, but not F22 or F23)
|
||||
- Check on status of disabled ZONE_DMA (They can now coexist with ZONE_DEVICE)
|
||||
- Check on status of CONFIG_DW_DMAC_CORE ( Built-in DW_DMAC for now, revisit later)
|
||||
|
||||
Linux 4.4 rebase notes:
|
||||
|
||||
CONFIG_RTL8XXXU_UNTESTED should be turned off. Great for rawhide, not for stable
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Run from within a source tree.
|
||||
|
||||
for i in configs/kernel-*.config
|
||||
do
|
||||
cp -f $i .config
|
||||
Arch=`head -1 .config | cut -b 3-`
|
||||
echo $Arch \($i\)
|
||||
make ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions || true;
|
||||
if [ -s .newoptions ]; then
|
||||
cat .newoptions;
|
||||
exit 1;
|
||||
fi;
|
||||
rm -f .newoptions;
|
||||
done
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# Uses git config options user.name and user.email, falls
|
||||
# back to env vars $GIT_COMMITTER_NAME and $GIT_COMMITTER_EMAIL
|
||||
#
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import os
|
||||
import string
|
||||
|
||||
class Specfile:
|
||||
def __init__(self,filename):
|
||||
file=open(filename,"r")
|
||||
self.lines=file.readlines()
|
||||
self.vr=""
|
||||
|
||||
def getNextVR(self,aspec):
|
||||
# Get VR for changelog entry.
|
||||
(ver,rel) = os.popen("LC_ALL=C rpm --specfile -q --qf '%%{version} %%{release}\n' --define 'dist %%{nil}' %s | head -1" % aspec).read().strip().split(' ')
|
||||
pos = 0
|
||||
# general released kernel case, bump 1st field
|
||||
fedora_build = rel.split('.')[pos]
|
||||
if fedora_build == "0":
|
||||
# this is a devel kernel, bump 2nd field
|
||||
pos = 1
|
||||
elif rel.split('.')[-1] != fedora_build:
|
||||
# this is a branch, must bump 3rd field
|
||||
pos = 2
|
||||
fedora_build = rel.split('.')[pos]
|
||||
if pos == 1 and len(rel.split('.')) > 4:
|
||||
# uh... what? devel kernel in a branch? private build? just do no VR in clog...
|
||||
print "Warning: not adding any VR to changelog, couldn't tell for sure which field to bump"
|
||||
pos = -1
|
||||
next_fedora_build = int(fedora_build) + 1
|
||||
if pos == 0:
|
||||
nextrel = str(next_fedora_build)
|
||||
elif pos == 1:
|
||||
nextrel = "0." + str(next_fedora_build)
|
||||
elif pos == 2:
|
||||
nextrel = rel.split('.')[0] + "." + rel.split('.')[1] + "." + str(next_fedora_build)
|
||||
if pos >= 0:
|
||||
for s in rel.split('.')[pos + 1:]:
|
||||
nextrel = nextrel + "." + s
|
||||
self.vr = " "+ver+'-'+nextrel
|
||||
|
||||
def addChangelogEntry(self,entry):
|
||||
user = os.popen("git config --get user.name").read().rstrip()
|
||||
if (user == ""):
|
||||
user = os.environ.get("GIT_COMMITTER_NAME","Unknown")
|
||||
email = os.popen("git config --get user.email").read().rstrip()
|
||||
if (email == ""):
|
||||
email = os.environ.get("GIT_COMMITTER_EMAIL","unknown")
|
||||
if (email == "unknown"):
|
||||
email = os.environ.get("USER","unknown")+"@fedoraproject.org"
|
||||
changematch=re.compile(r"^%changelog")
|
||||
date=time.strftime("%a %b %d %Y", time.localtime(time.time()))
|
||||
newchangelogentry="%changelog\n* "+date+" "+user+" <"+email+">"+self.vr+"\n"+entry+"\n\n"
|
||||
for i in range(len(self.lines)):
|
||||
if(changematch.match(self.lines[i])):
|
||||
self.lines[i]=newchangelogentry
|
||||
break
|
||||
|
||||
def writeFile(self,filename):
|
||||
file=open(filename,"w")
|
||||
file.writelines(self.lines)
|
||||
file.close()
|
||||
|
||||
if __name__=="__main__":
|
||||
aspec=(sys.argv[1])
|
||||
s=Specfile(aspec)
|
||||
entry=(sys.argv[2])
|
||||
s.getNextVR(aspec)
|
||||
s.addChangelogEntry(entry)
|
||||
s.writeFile(aspec)
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
#! /bin/sh
|
||||
# This script was created in a effort to make patch management a bit easier.
|
||||
# It list all the patches in the current tree and identifies if they are
|
||||
# present in the kernel.spec, PatchList.txt, both files or neither.
|
||||
#
|
||||
# eg. ./check-patchlist.sh [optional flag]
|
||||
|
||||
function usage(){
|
||||
echo "List all the patches currently in the tree. It also helps identify"
|
||||
echo "if the patch is present in kernel.spec or PatchList.txt. "
|
||||
echo "-h, --help "
|
||||
echo "-t, --tracked patches in both kernel.spec and PatchList.txt "
|
||||
echo "-p, --patchlist patches added to PatchList.txt. "
|
||||
echo "-s, --specfile patches added to kernel.spec. "
|
||||
echo "-n, --not-tracked patches in the tree but not in PatchList.txt "
|
||||
echo " or kernel.spec "
|
||||
}
|
||||
|
||||
BASEDIR=$(dirname "$( cd $(dirname $BASH_SOURCE[0]) && pwd)")
|
||||
pushd $BASEDIR > /dev/null
|
||||
|
||||
function list_all(){
|
||||
echo "===========Legend==========================="
|
||||
echo ". In kernel.spec "
|
||||
echo "* In PatchList.txt "
|
||||
echo "+ In PatchList.txt & Kernel.spec "
|
||||
echo "- Neither in PatchList.txt nor kernel.spec"
|
||||
echo "============================================"
|
||||
for patch in $(ls *.patch); do
|
||||
if [ ! -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ]
|
||||
then
|
||||
echo "+ ${patch}" # Patches in kernel.spec and PatchList.txt
|
||||
|
||||
elif [ ! -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ]
|
||||
then
|
||||
echo "* ${patch}" # Patches in PatchList.txt but not in kernel.spec
|
||||
|
||||
elif [ -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ]
|
||||
then
|
||||
echo ". ${patch}" # Patches in kernel.spec but not in PatchList.txt
|
||||
|
||||
else
|
||||
echo "- ${patch}" # Neither in PatchList.txt nor kernel.spec
|
||||
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function list_present_not_added(){
|
||||
for patch in $(ls *.patch); do
|
||||
if [ -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ]
|
||||
then
|
||||
echo $patch
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function list_present_added(){
|
||||
for patch in $(ls *.patch); do
|
||||
if [ ! -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ]
|
||||
then
|
||||
echo $patch
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function list_patchList(){
|
||||
for patch in $(ls *.patch); do
|
||||
if [ ! -z "$(grep $patch PatchList.txt)" ] && [ -z "$(grep $patch kernel.spec)" ]
|
||||
then
|
||||
echo $patch
|
||||
fi
|
||||
done
|
||||
|
||||
}
|
||||
function list_specfile(){
|
||||
for patch in $(ls *.patch); do
|
||||
if [ -z "$(grep $patch PatchList.txt)" ] && [ ! -z "$(grep $patch kernel.spec)" ]
|
||||
then
|
||||
echo $patch
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
if [ -z "$@" ]; then
|
||||
list_all
|
||||
else
|
||||
|
||||
for opt in "$@"; do
|
||||
case $opt in
|
||||
-t|--tracked)
|
||||
list_present_added
|
||||
;;
|
||||
-s|--specfile)
|
||||
list_specfile
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
;;
|
||||
-n|--not-added)
|
||||
list_present_not_added
|
||||
;;
|
||||
-p|--patchlist)
|
||||
list_patchList
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
popd > /dev/null
|
|
@ -0,0 +1,13 @@
|
|||
#! /bin/sh
|
||||
# Description:
|
||||
# rpmbuild combo to build the given architecture without
|
||||
# debugging information, perf or tools.
|
||||
#
|
||||
# Sample usage:
|
||||
# ./fast-build.sh x86_64 kernel-4.7.0-0.rc1.git1.2.fc25.src.rpm
|
||||
|
||||
if [ -z "$1" ] || [ -z "$2" ]; then
|
||||
echo "usage: $0 [ arch ] [ kernel-x.x.x.fcxx.src.rpm ] "
|
||||
fi
|
||||
|
||||
rpmbuild --target $1 --without debug --without debuginfo --without perf --without tools --rebuild $2
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
rpmbuild --target x86_64 --without debuginfo --without perf --without tools --rebuild $1
|
|
@ -1,14 +1,26 @@
|
|||
#!/bin/sh
|
||||
# This script allows for the generation of a git snapshot between the upstream
|
||||
# git tree and the current tree.
|
||||
#
|
||||
# Set LINUX_GIT to point to an upstream Linux git tree in your .bashrc or wherever.
|
||||
# Prerequisites:
|
||||
# Set LINUX_GIT to point to an upstream Linux git tree in your .bashrc
|
||||
# or wherever.
|
||||
|
||||
[ ! -d "$LINUX_GIT" ] && echo "error: set \$LINUX_GIT to point at upstream git tree" && exit 1
|
||||
# Look to see if LINUX_GIT is set in local .bashrc
|
||||
if [ -f ~/.bashrc ]; then
|
||||
source ~/.bashrc
|
||||
fi
|
||||
|
||||
if [ ! -d "$LINUX_GIT" ]; then
|
||||
echo "error: set \$LINUX_GIT to point at upstream git tree"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/-git.*// | sed s/.xz//)
|
||||
|
||||
if [ -z "$VER" ] ;
|
||||
then
|
||||
VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz//)
|
||||
VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz//)
|
||||
fi
|
||||
|
||||
OLDGIT=$(grep gitrev kernel.spec | head -n1 | sed s/%define\ gitrev\ //)
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
# Small script to generate the perf-man tarball. The script relies on having
|
||||
# LINUX_GIT set in your local .bashrc. By default the script will use the
|
||||
# the kernel version of the upstream tree set in LINUX_GIT. Use --version=x.y
|
||||
# to set a specific version.
|
||||
|
||||
# [Default] eg. ./scritps/generate-perf-man
|
||||
# eg. ./scripts/generate-perf-man --version=4.8
|
||||
function usage(){
|
||||
echo
|
||||
echo "Helps generate the perf-man tarball "
|
||||
echo "-h, --help "
|
||||
echo
|
||||
echo "./generate-perf-man.sh #Generates using upstream kernel version"
|
||||
echo
|
||||
echo "./generate-perf-man.sh --version=x.y #Generate using x.y version"
|
||||
}
|
||||
|
||||
if [ -f ~/.bashrc ]; then
|
||||
source ~/.bashrc
|
||||
fi
|
||||
|
||||
if [ ! -d "$LINUX_GIT" ]; then
|
||||
echo "Error: \$LINUX_GIT is not set to the upstream git tree."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BASEDIR=$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")
|
||||
pushd "$LINUX_GIT" > /dev/null
|
||||
KERNEL_VERSION=$( awk '/^VERSION =/ {print $3}' Makefile )
|
||||
KERNEL_PATCHLEVEL=$( awk '/^PATCHLEVEL =/ {print $3}' Makefile )
|
||||
|
||||
if [ ! -z "$@" ]; then
|
||||
for opt in "$@"; do
|
||||
case $opt in
|
||||
--version=*.*)
|
||||
version="${opt#*=}"
|
||||
KERNEL_VERSION=$( awk -F. '{print $1}' <<< $version )
|
||||
KERNEL_PATCHLEVEL=$( awk -F. '{print $2}' <<< $version )
|
||||
;;
|
||||
-h | --help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
cd tools/perf/Documentation/
|
||||
make
|
||||
tar -czvf $BASEDIR/perf-man-${KERNEL_VERSION}.${KERNEL_PATCHLEVEL}.tar.gz *.1
|
||||
make clean
|
||||
popd
|
|
@ -1,16 +1,35 @@
|
|||
#!/bin/sh
|
||||
# Script helps download the build logs for the current tree.
|
||||
# The downloaded logs will be saved in a logs/ within the
|
||||
# tree.
|
||||
|
||||
BASEDIR="$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")"
|
||||
pushd $BASEDIR > /dev/null
|
||||
|
||||
VER=$(fedpkg verrel)
|
||||
ver=$(echo $VER | sed -e 's/-/ /g' | awk '{print $2}')
|
||||
rev=$(echo $VER | sed -e 's/-/ /g' | awk '{print $3}')
|
||||
|
||||
if [ -d logs ]; then
|
||||
DIR=logs/
|
||||
# keep logs in one place. If logs directory does not exist, make it.
|
||||
if [ -d "$BASEDIR/logs" ]; then
|
||||
DIR="$BASEDIR/logs"
|
||||
else
|
||||
DIR=./
|
||||
mkdir "$BASEDIR/logs"
|
||||
DIR="$BASEDIR/logs"
|
||||
fi
|
||||
|
||||
wget -O $DIR/build-$VER-i686.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/i686/build.log
|
||||
wget -O $DIR/build-$VER-x86-64.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/x86_64/build.log
|
||||
wget -O $DIR/build-$VER-noarch.log http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/noarch/build.log
|
||||
# Common architectures that have build logs.
|
||||
ARCHS[0]=i686
|
||||
ARCHS[1]=x86_64
|
||||
ARCHS[2]=noarch
|
||||
ARCHS[3]=armv7hl
|
||||
|
||||
for arch in ${ARCHS[@]}; do
|
||||
URL=http://kojipkgs.fedoraproject.org/packages/kernel/$ver/$rev/data/logs/$arch/build.log
|
||||
# Only download logs if exist
|
||||
wget --spider -q $URL
|
||||
if [ $? -eq 0 ]; then
|
||||
wget -O $DIR/build-$VER-$arch.log $URL
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
|
|
|
@ -1,21 +1,42 @@
|
|||
#!/bin/sh
|
||||
# Easy application of new patches.
|
||||
# Always adds to the very end. (Bumps last patch nr by 100)
|
||||
# Parameters:
|
||||
# $1 - patch filename
|
||||
# $2 - description
|
||||
|
||||
OLD=$(grep ^Patch kernel.spec | tail -n1 | awk '{ print $1 }' | sed s/Patch// | sed s/://)
|
||||
NEW=$(($OLD/100*100+100))
|
||||
# Facilitates the addition of a new patch to the source tree.
|
||||
# -- Moves patch to tree
|
||||
# -- Adds patch to kernel.spec list of patches
|
||||
# -- Adds patch to git
|
||||
# -- change buildid macro to the name of the patch being added
|
||||
|
||||
sed -i "/^Patch$OLD:\ /a#\ $2\nPatch$NEW:\ $1" kernel.spec
|
||||
|
||||
LAST=$(grep ^ApplyPatch kernel.spec | tail -n1 | awk '{ print $2 }')
|
||||
|
||||
sed -i "/^ApplyPatch $LAST/aApplyPatch $1" kernel.spec
|
||||
|
||||
cvs add $1
|
||||
|
||||
scripts/bumpspecfile.py kernel.spec "- $2"
|
||||
make clog
|
||||
# Base directory is relative to where the script is.
|
||||
BASEDIR="$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)")"
|
||||
pushd $BASEDIR > /dev/null
|
||||
# Check for at least patch
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "usage: $0 [ /path/to/patch/ ] [ description ]"
|
||||
exit 1
|
||||
fi
|
||||
PATCHDIR=$1
|
||||
DESC=$2
|
||||
PATCH="$(basename "$PATCHDIR")"
|
||||
# Kernel.spec file in the current tree
|
||||
SPECFILE="$BASEDIR/kernel.spec"
|
||||
# If adding patch from outside the source tree move it to the source tree
|
||||
if [ -z "$(ls | grep $PATCH)" ]; then
|
||||
cp $PATCHDIR $BASEDIR/
|
||||
fi
|
||||
|
||||
if [ ! -z "$(grep $PATCH $SPECFILE)" ]
|
||||
then
|
||||
echo "$PATCH already in kernel.spec"
|
||||
exit 1
|
||||
fi
|
||||
# ID number of the last patch in kernel.spec
|
||||
LPATCH_ID=$(grep ^Patch $SPECFILE | tail -n1 | awk '{ print $1 }' | sed s/Patch// | sed s/://)
|
||||
# ID of the next patch to be added to kernel.spec
|
||||
NPATCH_ID=$(($LPATCH_ID + 1 ))
|
||||
# Add patch with new id at the end of the list of patches
|
||||
sed -i "/^Patch$LPATCH_ID:\ /a#\ $DESC\nPatch$NPATCH_ID:\ $PATCH" $SPECFILE
|
||||
# Add it to git
|
||||
git add $PATCH
|
||||
BUILDID_PATCH="$(echo $PATCH | sed 's/\-/\_/g' )"
|
||||
sed -i "s/^.*define buildid .*$/%define buildid .$BUILDID_PATCH/" $SPECFILE
|
||||
popd > /dev/null
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
#!/usr/bin/perl -w
|
||||
#
|
||||
# Script to rediff all patches in the spec
|
||||
# Usage: perl -w rediffall.pl < kernel-2.4.spec
|
||||
#
|
||||
# $workdir is where the new rediff'ed patches are created
|
||||
# $origdir is where the original patches and tarball are located
|
||||
#
|
||||
# Note that both $workdir and $origdir must be absolute path names.
|
||||
# Suggestion: create a /kernel symbolic link to the top of your CVS tree.
|
||||
|
||||
my $workdir = "/dev/shm/redifftree";
|
||||
my $origdir = "/home/davej/devel";
|
||||
my $kernver = "linux-2.6.17";
|
||||
my $datestrip = "s/^\\(\\(+++\\|---\\) [^[:blank:]]\\+\\)[[:blank:]].*/\\1/";
|
||||
my $patchindex = 0;
|
||||
my @patchlist;
|
||||
|
||||
# phase 1: create a tree
|
||||
print "Extracting pristine source..\n";
|
||||
system("mkdir -p $workdir");
|
||||
system("rm -rf $workdir/*");
|
||||
chdir("$workdir");
|
||||
system("tar -jxvf $origdir/$kernver.tar.bz2 > /dev/null");
|
||||
system("cp -al $kernver linux-$patchindex");
|
||||
|
||||
# phase 2: read the spec from stdin and store all patches
|
||||
print "Reading specfile..\n";
|
||||
|
||||
while (<>) {
|
||||
my $line = $_;
|
||||
if ($line =~ /^Patch([0-9]+)\: ([a-zA-Z0-9\-\_\.\+]+\.patch)/) {
|
||||
$patchlist[$1] = $2;
|
||||
} else {
|
||||
if ($line =~ /^Patch([0-9]+)\: ([a-zA-Z0-9\-\_\.]+\.bz2)/) {
|
||||
$patchlist[$1] = $2;
|
||||
}
|
||||
}
|
||||
|
||||
if ($line =~ /^%patch([0-9]+) -p1/) {
|
||||
# copy the tree, apply the patch, diff and remove the old tree
|
||||
my $oldindex = $patchindex;
|
||||
$patchindex = $1;
|
||||
|
||||
print "rediffing patch number $patchindex: $patchlist[$patchindex]\n";
|
||||
|
||||
system("cp -al linux-$oldindex linux-$patchindex");
|
||||
chdir("linux-$patchindex");
|
||||
if ($patchlist[$patchindex] =~ /bz2/) {
|
||||
system("bzcat $origdir/$patchlist[$patchindex] | patch -p1 &>/dev/null");
|
||||
} else {
|
||||
system("cat $origdir/$patchlist[$patchindex] | patch -p1 &>/dev/null");
|
||||
}
|
||||
chdir("$workdir");
|
||||
system("rm -f `find -name \"*orig\"`");
|
||||
if ($patchlist[$patchindex] =~ /bz2/) {
|
||||
} else {
|
||||
system("diff -urNp --exclude-from=/home/davej/.exclude linux-$oldindex linux-$patchindex | sed '$datestrip' > $patchlist[$patchindex]");
|
||||
}
|
||||
system("rm -rf linux-$oldindex");
|
||||
}
|
||||
};
|
||||
|
||||
1;
|
|
@ -0,0 +1,931 @@
|
|||
From 1a93a6eac32a2853177f10e274b9b761b42356eb Mon Sep 17 00:00:00 2001
|
||||
From: Javier Martinez Canillas <javier@osg.samsung.com>
|
||||
Date: Mon, 8 Aug 2016 13:08:25 -0400
|
||||
Subject: [PATCH 01/10] security: Use IS_ENABLED() instead of checking for
|
||||
built-in or module
|
||||
|
||||
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled
|
||||
either built-in or as a module, use that macro instead of open coding
|
||||
the same.
|
||||
|
||||
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
|
||||
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/lsm_audit.c | 2 +-
|
||||
security/selinux/hooks.c | 12 ++++++------
|
||||
security/smack/smack_netfilter.c | 4 ++--
|
||||
3 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
|
||||
index cccbf30..5369036 100644
|
||||
--- a/security/lsm_audit.c
|
||||
+++ b/security/lsm_audit.c
|
||||
@@ -99,7 +99,7 @@ int ipv4_skb_to_auditdata(struct sk_buff *skb,
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
/**
|
||||
* ipv6_skb_to_auditdata : fill auditdata from skb
|
||||
* @skb : the skb
|
||||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
|
||||
index 13185a6..880f953 100644
|
||||
--- a/security/selinux/hooks.c
|
||||
+++ b/security/selinux/hooks.c
|
||||
@@ -3984,7 +3984,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
|
||||
/* Returns error only if unable to parse addresses */
|
||||
static int selinux_parse_skb_ipv6(struct sk_buff *skb,
|
||||
@@ -4075,7 +4075,7 @@ static int selinux_parse_skb(struct sk_buff *skb, struct common_audit_data *ad,
|
||||
&ad->u.net->v4info.daddr);
|
||||
goto okay;
|
||||
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
case PF_INET6:
|
||||
ret = selinux_parse_skb_ipv6(skb, ad, proto);
|
||||
if (ret)
|
||||
@@ -5029,7 +5029,7 @@ static unsigned int selinux_ipv4_forward(void *priv,
|
||||
return selinux_ip_forward(skb, state->in, PF_INET);
|
||||
}
|
||||
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
static unsigned int selinux_ipv6_forward(void *priv,
|
||||
struct sk_buff *skb,
|
||||
const struct nf_hook_state *state)
|
||||
@@ -5087,7 +5087,7 @@ static unsigned int selinux_ipv4_output(void *priv,
|
||||
return selinux_ip_output(skb, PF_INET);
|
||||
}
|
||||
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
static unsigned int selinux_ipv6_output(void *priv,
|
||||
struct sk_buff *skb,
|
||||
const struct nf_hook_state *state)
|
||||
@@ -5273,7 +5273,7 @@ static unsigned int selinux_ipv4_postroute(void *priv,
|
||||
return selinux_ip_postroute(skb, state->out, PF_INET);
|
||||
}
|
||||
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
static unsigned int selinux_ipv6_postroute(void *priv,
|
||||
struct sk_buff *skb,
|
||||
const struct nf_hook_state *state)
|
||||
@@ -6317,7 +6317,7 @@ static struct nf_hook_ops selinux_nf_ops[] = {
|
||||
.hooknum = NF_INET_LOCAL_OUT,
|
||||
.priority = NF_IP_PRI_SELINUX_FIRST,
|
||||
},
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
{
|
||||
.hook = selinux_ipv6_postroute,
|
||||
.pf = NFPROTO_IPV6,
|
||||
diff --git a/security/smack/smack_netfilter.c b/security/smack/smack_netfilter.c
|
||||
index aa6bf1b..205b785 100644
|
||||
--- a/security/smack/smack_netfilter.c
|
||||
+++ b/security/smack/smack_netfilter.c
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <net/inet_sock.h>
|
||||
#include "smack.h"
|
||||
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
|
||||
static unsigned int smack_ipv6_output(void *priv,
|
||||
struct sk_buff *skb,
|
||||
@@ -64,7 +64,7 @@ static struct nf_hook_ops smack_nf_ops[] = {
|
||||
.hooknum = NF_INET_LOCAL_OUT,
|
||||
.priority = NF_IP_PRI_SELINUX_FIRST,
|
||||
},
|
||||
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
+#if IS_ENABLED(CONFIG_IPV6)
|
||||
{
|
||||
.hook = smack_ipv6_output,
|
||||
.pf = NFPROTO_IPV6,
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 8b31f456c72e53ee97474a538bcd91bfb1b93fb7 Mon Sep 17 00:00:00 2001
|
||||
From: William Roberts <william.c.roberts@intel.com>
|
||||
Date: Mon, 8 Aug 2016 13:08:34 -0400
|
||||
Subject: [PATCH 02/10] selinux: print leading 0x on ioctlcmd audits
|
||||
|
||||
ioctlcmd is currently printing hex numbers, but their is no leading
|
||||
0x. Thus things like ioctlcmd=1234 are misleading, as the base is
|
||||
not evident.
|
||||
|
||||
Correct this by adding 0x as a prefix, so ioctlcmd=1234 becomes
|
||||
ioctlcmd=0x1234.
|
||||
|
||||
Signed-off-by: William Roberts <william.c.roberts@intel.com>
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/lsm_audit.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/security/lsm_audit.c b/security/lsm_audit.c
|
||||
index 5369036..9bf8518 100644
|
||||
--- a/security/lsm_audit.c
|
||||
+++ b/security/lsm_audit.c
|
||||
@@ -257,7 +257,7 @@ static void dump_common_audit_data(struct audit_buffer *ab,
|
||||
audit_log_format(ab, " ino=%lu", inode->i_ino);
|
||||
}
|
||||
|
||||
- audit_log_format(ab, " ioctlcmd=%hx", a->u.op->cmd);
|
||||
+ audit_log_format(ab, " ioctlcmd=0x%hx", a->u.op->cmd);
|
||||
break;
|
||||
}
|
||||
case LSM_AUDIT_DATA_DENTRY: {
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From d8ad8b49618410ddeafd78465b63a6cedd6c9484 Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Goyal <vgoyal@redhat.com>
|
||||
Date: Wed, 13 Jul 2016 11:13:56 -0400
|
||||
Subject: [PATCH 03/10] security, overlayfs: provide copy up security hook for
|
||||
unioned files
|
||||
|
||||
Provide a security hook to label new file correctly when a file is copied
|
||||
up from lower layer to upper layer of a overlay/union mount.
|
||||
|
||||
This hook can prepare a new set of creds which are suitable for new file
|
||||
creation during copy up. Caller will use new creds to create file and then
|
||||
revert back to old creds and release new creds.
|
||||
|
||||
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
|
||||
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
[PM: whitespace cleanup to appease checkpatch.pl]
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
fs/overlayfs/copy_up.c | 15 +++++++++++++++
|
||||
include/linux/lsm_hooks.h | 11 +++++++++++
|
||||
include/linux/security.h | 6 ++++++
|
||||
security/security.c | 8 ++++++++
|
||||
4 files changed, 40 insertions(+)
|
||||
|
||||
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
|
||||
index 54e5d66..c297b1f 100644
|
||||
--- a/fs/overlayfs/copy_up.c
|
||||
+++ b/fs/overlayfs/copy_up.c
|
||||
@@ -246,6 +246,8 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,
|
||||
struct dentry *upper = NULL;
|
||||
umode_t mode = stat->mode;
|
||||
int err;
|
||||
+ const struct cred *old_creds = NULL;
|
||||
+ struct cred *new_creds = NULL;
|
||||
|
||||
newdentry = ovl_lookup_temp(workdir, dentry);
|
||||
err = PTR_ERR(newdentry);
|
||||
@@ -258,10 +260,23 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir,
|
||||
if (IS_ERR(upper))
|
||||
goto out1;
|
||||
|
||||
+ err = security_inode_copy_up(dentry, &new_creds);
|
||||
+ if (err < 0)
|
||||
+ goto out2;
|
||||
+
|
||||
+ if (new_creds)
|
||||
+ old_creds = override_creds(new_creds);
|
||||
+
|
||||
/* Can't properly set mode on creation because of the umask */
|
||||
stat->mode &= S_IFMT;
|
||||
err = ovl_create_real(wdir, newdentry, stat, link, NULL, true);
|
||||
stat->mode = mode;
|
||||
+
|
||||
+ if (new_creds) {
|
||||
+ revert_creds(old_creds);
|
||||
+ put_cred(new_creds);
|
||||
+ }
|
||||
+
|
||||
if (err)
|
||||
goto out2;
|
||||
|
||||
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
|
||||
index 101bf19..cb69fc8 100644
|
||||
--- a/include/linux/lsm_hooks.h
|
||||
+++ b/include/linux/lsm_hooks.h
|
||||
@@ -401,6 +401,15 @@
|
||||
* @inode contains a pointer to the inode.
|
||||
* @secid contains a pointer to the location where result will be saved.
|
||||
* In case of failure, @secid will be set to zero.
|
||||
+ * @inode_copy_up:
|
||||
+ * A file is about to be copied up from lower layer to upper layer of
|
||||
+ * overlay filesystem. Security module can prepare a set of new creds
|
||||
+ * and modify as need be and return new creds. Caller will switch to
|
||||
+ * new creds temporarily to create new file and release newly allocated
|
||||
+ * creds.
|
||||
+ * @src indicates the union dentry of file that is being copied up.
|
||||
+ * @new pointer to pointer to return newly allocated creds.
|
||||
+ * Returns 0 on success or a negative error code on error.
|
||||
*
|
||||
* Security hooks for file operations
|
||||
*
|
||||
@@ -1425,6 +1434,7 @@ union security_list_options {
|
||||
int (*inode_listsecurity)(struct inode *inode, char *buffer,
|
||||
size_t buffer_size);
|
||||
void (*inode_getsecid)(struct inode *inode, u32 *secid);
|
||||
+ int (*inode_copy_up)(struct dentry *src, struct cred **new);
|
||||
|
||||
int (*file_permission)(struct file *file, int mask);
|
||||
int (*file_alloc_security)(struct file *file);
|
||||
@@ -1696,6 +1706,7 @@ struct security_hook_heads {
|
||||
struct list_head inode_setsecurity;
|
||||
struct list_head inode_listsecurity;
|
||||
struct list_head inode_getsecid;
|
||||
+ struct list_head inode_copy_up;
|
||||
struct list_head file_permission;
|
||||
struct list_head file_alloc_security;
|
||||
struct list_head file_free_security;
|
||||
diff --git a/include/linux/security.h b/include/linux/security.h
|
||||
index 7831cd5..c5b0ccd 100644
|
||||
--- a/include/linux/security.h
|
||||
+++ b/include/linux/security.h
|
||||
@@ -282,6 +282,7 @@ int security_inode_getsecurity(struct inode *inode, const char *name, void **buf
|
||||
int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags);
|
||||
int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size);
|
||||
void security_inode_getsecid(struct inode *inode, u32 *secid);
|
||||
+int security_inode_copy_up(struct dentry *src, struct cred **new);
|
||||
int security_file_permission(struct file *file, int mask);
|
||||
int security_file_alloc(struct file *file);
|
||||
void security_file_free(struct file *file);
|
||||
@@ -758,6 +759,11 @@ static inline void security_inode_getsecid(struct inode *inode, u32 *secid)
|
||||
*secid = 0;
|
||||
}
|
||||
|
||||
+static inline int security_inode_copy_up(struct dentry *src, struct cred **new)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static inline int security_file_permission(struct file *file, int mask)
|
||||
{
|
||||
return 0;
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index 4838e7f..f2a7f27 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -748,6 +748,12 @@ void security_inode_getsecid(struct inode *inode, u32 *secid)
|
||||
call_void_hook(inode_getsecid, inode, secid);
|
||||
}
|
||||
|
||||
+int security_inode_copy_up(struct dentry *src, struct cred **new)
|
||||
+{
|
||||
+ return call_int_hook(inode_copy_up, 0, src, new);
|
||||
+}
|
||||
+EXPORT_SYMBOL(security_inode_copy_up);
|
||||
+
|
||||
int security_file_permission(struct file *file, int mask)
|
||||
{
|
||||
int ret;
|
||||
@@ -1684,6 +1690,8 @@ struct security_hook_heads security_hook_heads = {
|
||||
LIST_HEAD_INIT(security_hook_heads.inode_listsecurity),
|
||||
.inode_getsecid =
|
||||
LIST_HEAD_INIT(security_hook_heads.inode_getsecid),
|
||||
+ .inode_copy_up =
|
||||
+ LIST_HEAD_INIT(security_hook_heads.inode_copy_up),
|
||||
.file_permission =
|
||||
LIST_HEAD_INIT(security_hook_heads.file_permission),
|
||||
.file_alloc_security =
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 56909eb3f559103196ecbf2c08c923e0804980fb Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Goyal <vgoyal@redhat.com>
|
||||
Date: Wed, 13 Jul 2016 10:44:48 -0400
|
||||
Subject: [PATCH 04/10] selinux: Implementation for inode_copy_up() hook
|
||||
|
||||
A file is being copied up for overlay file system. Prepare a new set of
|
||||
creds and set create_sid appropriately so that new file is created with
|
||||
appropriate label.
|
||||
|
||||
Overlay inode has right label for both context and non-context mount
|
||||
cases. In case of non-context mount, overlay inode will have the label
|
||||
of lower file and in case of context mount, overlay inode will have
|
||||
the label from context= mount option.
|
||||
|
||||
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
|
||||
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/selinux/hooks.c | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
|
||||
index 880f953..40597ed 100644
|
||||
--- a/security/selinux/hooks.c
|
||||
+++ b/security/selinux/hooks.c
|
||||
@@ -3293,6 +3293,26 @@ static void selinux_inode_getsecid(struct inode *inode, u32 *secid)
|
||||
*secid = isec->sid;
|
||||
}
|
||||
|
||||
+static int selinux_inode_copy_up(struct dentry *src, struct cred **new)
|
||||
+{
|
||||
+ u32 sid;
|
||||
+ struct task_security_struct *tsec;
|
||||
+ struct cred *new_creds = *new;
|
||||
+
|
||||
+ if (new_creds == NULL) {
|
||||
+ new_creds = prepare_creds();
|
||||
+ if (!new_creds)
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ tsec = new_creds->security;
|
||||
+ /* Get label from overlay inode and set it in create_sid */
|
||||
+ selinux_inode_getsecid(d_inode(src), &sid);
|
||||
+ tsec->create_sid = sid;
|
||||
+ *new = new_creds;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/* file security operations */
|
||||
|
||||
static int selinux_revalidate_file_permission(struct file *file, int mask)
|
||||
@@ -6088,6 +6108,7 @@ static struct security_hook_list selinux_hooks[] = {
|
||||
LSM_HOOK_INIT(inode_setsecurity, selinux_inode_setsecurity),
|
||||
LSM_HOOK_INIT(inode_listsecurity, selinux_inode_listsecurity),
|
||||
LSM_HOOK_INIT(inode_getsecid, selinux_inode_getsecid),
|
||||
+ LSM_HOOK_INIT(inode_copy_up, selinux_inode_copy_up),
|
||||
|
||||
LSM_HOOK_INIT(file_permission, selinux_file_permission),
|
||||
LSM_HOOK_INIT(file_alloc_security, selinux_file_alloc_security),
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 121ab822ef21914adac2fa3730efeeb8fd762473 Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Goyal <vgoyal@redhat.com>
|
||||
Date: Wed, 13 Jul 2016 10:44:49 -0400
|
||||
Subject: [PATCH 05/10] security,overlayfs: Provide security hook for copy up
|
||||
of xattrs for overlay file
|
||||
|
||||
Provide a security hook which is called when xattrs of a file are being
|
||||
copied up. This hook is called once for each xattr and LSM can return
|
||||
0 if the security module wants the xattr to be copied up, 1 if the
|
||||
security module wants the xattr to be discarded on the copy, -EOPNOTSUPP
|
||||
if the security module does not handle/manage the xattr, or a -errno
|
||||
upon an error.
|
||||
|
||||
Signed-off-by: David Howells <dhowells@redhat.com>
|
||||
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
|
||||
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
[PM: whitespace cleanup for checkpatch.pl]
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
fs/overlayfs/copy_up.c | 7 +++++++
|
||||
include/linux/lsm_hooks.h | 10 ++++++++++
|
||||
include/linux/security.h | 6 ++++++
|
||||
security/security.c | 8 ++++++++
|
||||
4 files changed, 31 insertions(+)
|
||||
|
||||
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
|
||||
index c297b1f..cd65f12 100644
|
||||
--- a/fs/overlayfs/copy_up.c
|
||||
+++ b/fs/overlayfs/copy_up.c
|
||||
@@ -103,6 +103,13 @@ retry:
|
||||
goto retry;
|
||||
}
|
||||
|
||||
+ error = security_inode_copy_up_xattr(name);
|
||||
+ if (error < 0 && error != -EOPNOTSUPP)
|
||||
+ break;
|
||||
+ if (error == 1) {
|
||||
+ error = 0;
|
||||
+ continue; /* Discard */
|
||||
+ }
|
||||
error = vfs_setxattr(new, name, value, size, 0);
|
||||
if (error)
|
||||
break;
|
||||
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
|
||||
index cb69fc8..5797122 100644
|
||||
--- a/include/linux/lsm_hooks.h
|
||||
+++ b/include/linux/lsm_hooks.h
|
||||
@@ -410,6 +410,14 @@
|
||||
* @src indicates the union dentry of file that is being copied up.
|
||||
* @new pointer to pointer to return newly allocated creds.
|
||||
* Returns 0 on success or a negative error code on error.
|
||||
+ * @inode_copy_up_xattr:
|
||||
+ * Filter the xattrs being copied up when a unioned file is copied
|
||||
+ * up from a lower layer to the union/overlay layer.
|
||||
+ * @name indicates the name of the xattr.
|
||||
+ * Returns 0 to accept the xattr, 1 to discard the xattr, -EOPNOTSUPP if
|
||||
+ * security module does not know about attribute or a negative error code
|
||||
+ * to abort the copy up. Note that the caller is responsible for reading
|
||||
+ * and writing the xattrs as this hook is merely a filter.
|
||||
*
|
||||
* Security hooks for file operations
|
||||
*
|
||||
@@ -1435,6 +1443,7 @@ union security_list_options {
|
||||
size_t buffer_size);
|
||||
void (*inode_getsecid)(struct inode *inode, u32 *secid);
|
||||
int (*inode_copy_up)(struct dentry *src, struct cred **new);
|
||||
+ int (*inode_copy_up_xattr)(const char *name);
|
||||
|
||||
int (*file_permission)(struct file *file, int mask);
|
||||
int (*file_alloc_security)(struct file *file);
|
||||
@@ -1707,6 +1716,7 @@ struct security_hook_heads {
|
||||
struct list_head inode_listsecurity;
|
||||
struct list_head inode_getsecid;
|
||||
struct list_head inode_copy_up;
|
||||
+ struct list_head inode_copy_up_xattr;
|
||||
struct list_head file_permission;
|
||||
struct list_head file_alloc_security;
|
||||
struct list_head file_free_security;
|
||||
diff --git a/include/linux/security.h b/include/linux/security.h
|
||||
index c5b0ccd..536fafd 100644
|
||||
--- a/include/linux/security.h
|
||||
+++ b/include/linux/security.h
|
||||
@@ -283,6 +283,7 @@ int security_inode_setsecurity(struct inode *inode, const char *name, const void
|
||||
int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size);
|
||||
void security_inode_getsecid(struct inode *inode, u32 *secid);
|
||||
int security_inode_copy_up(struct dentry *src, struct cred **new);
|
||||
+int security_inode_copy_up_xattr(const char *name);
|
||||
int security_file_permission(struct file *file, int mask);
|
||||
int security_file_alloc(struct file *file);
|
||||
void security_file_free(struct file *file);
|
||||
@@ -764,6 +765,11 @@ static inline int security_inode_copy_up(struct dentry *src, struct cred **new)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static inline int security_inode_copy_up_xattr(const char *name)
|
||||
+{
|
||||
+ return -EOPNOTSUPP;
|
||||
+}
|
||||
+
|
||||
static inline int security_file_permission(struct file *file, int mask)
|
||||
{
|
||||
return 0;
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index f2a7f27..a9e2bb9 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -754,6 +754,12 @@ int security_inode_copy_up(struct dentry *src, struct cred **new)
|
||||
}
|
||||
EXPORT_SYMBOL(security_inode_copy_up);
|
||||
|
||||
+int security_inode_copy_up_xattr(const char *name)
|
||||
+{
|
||||
+ return call_int_hook(inode_copy_up_xattr, -EOPNOTSUPP, name);
|
||||
+}
|
||||
+EXPORT_SYMBOL(security_inode_copy_up_xattr);
|
||||
+
|
||||
int security_file_permission(struct file *file, int mask)
|
||||
{
|
||||
int ret;
|
||||
@@ -1692,6 +1698,8 @@ struct security_hook_heads security_hook_heads = {
|
||||
LIST_HEAD_INIT(security_hook_heads.inode_getsecid),
|
||||
.inode_copy_up =
|
||||
LIST_HEAD_INIT(security_hook_heads.inode_copy_up),
|
||||
+ .inode_copy_up_xattr =
|
||||
+ LIST_HEAD_INIT(security_hook_heads.inode_copy_up_xattr),
|
||||
.file_permission =
|
||||
LIST_HEAD_INIT(security_hook_heads.file_permission),
|
||||
.file_alloc_security =
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 19472b69d639d58415866bf127d5f9005038c105 Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Goyal <vgoyal@redhat.com>
|
||||
Date: Wed, 13 Jul 2016 10:44:50 -0400
|
||||
Subject: [PATCH 06/10] selinux: Implementation for inode_copy_up_xattr() hook
|
||||
|
||||
When a file is copied up in overlay, we have already created file on
|
||||
upper/ with right label and there is no need to copy up selinux
|
||||
label/xattr from lower file to upper file. In fact in case of context
|
||||
mount, we don't want to copy up label as newly created file got its label
|
||||
from context= option.
|
||||
|
||||
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
|
||||
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/selinux/hooks.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
|
||||
index 40597ed..a2d5108 100644
|
||||
--- a/security/selinux/hooks.c
|
||||
+++ b/security/selinux/hooks.c
|
||||
@@ -3313,6 +3313,21 @@ static int selinux_inode_copy_up(struct dentry *src, struct cred **new)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int selinux_inode_copy_up_xattr(const char *name)
|
||||
+{
|
||||
+ /* The copy_up hook above sets the initial context on an inode, but we
|
||||
+ * don't then want to overwrite it by blindly copying all the lower
|
||||
+ * xattrs up. Instead, we have to filter out SELinux-related xattrs.
|
||||
+ */
|
||||
+ if (strcmp(name, XATTR_NAME_SELINUX) == 0)
|
||||
+ return 1; /* Discard */
|
||||
+ /*
|
||||
+ * Any other attribute apart from SELINUX is not claimed, supported
|
||||
+ * by selinux.
|
||||
+ */
|
||||
+ return -EOPNOTSUPP;
|
||||
+}
|
||||
+
|
||||
/* file security operations */
|
||||
|
||||
static int selinux_revalidate_file_permission(struct file *file, int mask)
|
||||
@@ -6109,6 +6124,7 @@ static struct security_hook_list selinux_hooks[] = {
|
||||
LSM_HOOK_INIT(inode_listsecurity, selinux_inode_listsecurity),
|
||||
LSM_HOOK_INIT(inode_getsecid, selinux_inode_getsecid),
|
||||
LSM_HOOK_INIT(inode_copy_up, selinux_inode_copy_up),
|
||||
+ LSM_HOOK_INIT(inode_copy_up_xattr, selinux_inode_copy_up_xattr),
|
||||
|
||||
LSM_HOOK_INIT(file_permission, selinux_file_permission),
|
||||
LSM_HOOK_INIT(file_alloc_security, selinux_file_alloc_security),
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From c957f6df52c509ccfbb96659fd1a0f7812de333f Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Goyal <vgoyal@redhat.com>
|
||||
Date: Wed, 13 Jul 2016 10:44:51 -0400
|
||||
Subject: [PATCH 07/10] selinux: Pass security pointer to
|
||||
determine_inode_label()
|
||||
|
||||
Right now selinux_determine_inode_label() works on security pointer of
|
||||
current task. Soon I need this to work on a security pointer retrieved
|
||||
from a set of creds. So start passing in a pointer and caller can
|
||||
decide where to fetch security pointer from.
|
||||
|
||||
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
|
||||
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/selinux/hooks.c | 19 ++++++++++---------
|
||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
|
||||
index a2d5108..f9d398b 100644
|
||||
--- a/security/selinux/hooks.c
|
||||
+++ b/security/selinux/hooks.c
|
||||
@@ -1808,13 +1808,13 @@ out:
|
||||
/*
|
||||
* Determine the label for an inode that might be unioned.
|
||||
*/
|
||||
-static int selinux_determine_inode_label(struct inode *dir,
|
||||
- const struct qstr *name,
|
||||
- u16 tclass,
|
||||
- u32 *_new_isid)
|
||||
+static int
|
||||
+selinux_determine_inode_label(const struct task_security_struct *tsec,
|
||||
+ struct inode *dir,
|
||||
+ const struct qstr *name, u16 tclass,
|
||||
+ u32 *_new_isid)
|
||||
{
|
||||
const struct superblock_security_struct *sbsec = dir->i_sb->s_security;
|
||||
- const struct task_security_struct *tsec = current_security();
|
||||
|
||||
if ((sbsec->flags & SE_SBINITIALIZED) &&
|
||||
(sbsec->behavior == SECURITY_FS_USE_MNTPOINT)) {
|
||||
@@ -1857,8 +1857,8 @@ static int may_create(struct inode *dir,
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
- rc = selinux_determine_inode_label(dir, &dentry->d_name, tclass,
|
||||
- &newsid);
|
||||
+ rc = selinux_determine_inode_label(current_security(), dir,
|
||||
+ &dentry->d_name, tclass, &newsid);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
@@ -2838,7 +2838,8 @@ static int selinux_dentry_init_security(struct dentry *dentry, int mode,
|
||||
u32 newsid;
|
||||
int rc;
|
||||
|
||||
- rc = selinux_determine_inode_label(d_inode(dentry->d_parent), name,
|
||||
+ rc = selinux_determine_inode_label(current_security(),
|
||||
+ d_inode(dentry->d_parent), name,
|
||||
inode_mode_to_security_class(mode),
|
||||
&newsid);
|
||||
if (rc)
|
||||
@@ -2863,7 +2864,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
|
||||
sid = tsec->sid;
|
||||
newsid = tsec->create_sid;
|
||||
|
||||
- rc = selinux_determine_inode_label(
|
||||
+ rc = selinux_determine_inode_label(current_security(),
|
||||
dir, qstr,
|
||||
inode_mode_to_security_class(inode->i_mode),
|
||||
&newsid);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 2602625b7e46576b00db619ac788c508ba3bcb2c Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Goyal <vgoyal@redhat.com>
|
||||
Date: Wed, 13 Jul 2016 10:44:52 -0400
|
||||
Subject: [PATCH 08/10] security, overlayfs: Provide hook to correctly label
|
||||
newly created files
|
||||
|
||||
During a new file creation we need to make sure new file is created with the
|
||||
right label. New file is created in upper/ so effectively file should get
|
||||
label as if task had created file in upper/.
|
||||
|
||||
We switched to mounter's creds for actual file creation. Also if there is a
|
||||
whiteout present, then file will be created in work/ dir first and then
|
||||
renamed in upper. In none of the cases file will be labeled as we want it to
|
||||
be.
|
||||
|
||||
This patch introduces a new hook dentry_create_files_as(), which determines
|
||||
the label/context dentry will get if it had been created by task in upper
|
||||
and modify passed set of creds appropriately. Caller makes use of these new
|
||||
creds for file creation.
|
||||
|
||||
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
|
||||
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
[PM: fix whitespace issues found with checkpatch.pl]
|
||||
[PM: changes to use stat->mode in ovl_create_or_link()]
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
fs/overlayfs/dir.c | 10 ++++++++++
|
||||
include/linux/lsm_hooks.h | 15 +++++++++++++++
|
||||
include/linux/security.h | 12 ++++++++++++
|
||||
security/security.c | 11 +++++++++++
|
||||
4 files changed, 48 insertions(+)
|
||||
|
||||
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
|
||||
index 12bcd07..a155e52 100644
|
||||
--- a/fs/overlayfs/dir.c
|
||||
+++ b/fs/overlayfs/dir.c
|
||||
@@ -435,6 +435,15 @@ static int ovl_create_or_link(struct dentry *dentry, struct inode *inode,
|
||||
if (override_cred) {
|
||||
override_cred->fsuid = inode->i_uid;
|
||||
override_cred->fsgid = inode->i_gid;
|
||||
+ if (!hardlink) {
|
||||
+ err = security_dentry_create_files_as(dentry,
|
||||
+ stat->mode, &dentry->d_name, old_cred,
|
||||
+ override_cred);
|
||||
+ if (err) {
|
||||
+ put_cred(override_cred);
|
||||
+ goto out_revert_creds;
|
||||
+ }
|
||||
+ }
|
||||
put_cred(override_creds(override_cred));
|
||||
put_cred(override_cred);
|
||||
|
||||
@@ -445,6 +454,7 @@ static int ovl_create_or_link(struct dentry *dentry, struct inode *inode,
|
||||
err = ovl_create_over_whiteout(dentry, inode, stat,
|
||||
link, hardlink);
|
||||
}
|
||||
+out_revert_creds:
|
||||
revert_creds(old_cred);
|
||||
if (!err) {
|
||||
struct inode *realinode = d_inode(ovl_dentry_upper(dentry));
|
||||
diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
|
||||
index 5797122..f2af2af 100644
|
||||
--- a/include/linux/lsm_hooks.h
|
||||
+++ b/include/linux/lsm_hooks.h
|
||||
@@ -151,6 +151,16 @@
|
||||
* @name name of the last path component used to create file
|
||||
* @ctx pointer to place the pointer to the resulting context in.
|
||||
* @ctxlen point to place the length of the resulting context.
|
||||
+ * @dentry_create_files_as:
|
||||
+ * Compute a context for a dentry as the inode is not yet available
|
||||
+ * and set that context in passed in creds so that new files are
|
||||
+ * created using that context. Context is calculated using the
|
||||
+ * passed in creds and not the creds of the caller.
|
||||
+ * @dentry dentry to use in calculating the context.
|
||||
+ * @mode mode used to determine resource type.
|
||||
+ * @name name of the last path component used to create file
|
||||
+ * @old creds which should be used for context calculation
|
||||
+ * @new creds to modify
|
||||
*
|
||||
*
|
||||
* Security hooks for inode operations.
|
||||
@@ -1375,6 +1385,10 @@ union security_list_options {
|
||||
int (*dentry_init_security)(struct dentry *dentry, int mode,
|
||||
const struct qstr *name, void **ctx,
|
||||
u32 *ctxlen);
|
||||
+ int (*dentry_create_files_as)(struct dentry *dentry, int mode,
|
||||
+ struct qstr *name,
|
||||
+ const struct cred *old,
|
||||
+ struct cred *new);
|
||||
|
||||
|
||||
#ifdef CONFIG_SECURITY_PATH
|
||||
@@ -1675,6 +1689,7 @@ struct security_hook_heads {
|
||||
struct list_head sb_clone_mnt_opts;
|
||||
struct list_head sb_parse_opts_str;
|
||||
struct list_head dentry_init_security;
|
||||
+ struct list_head dentry_create_files_as;
|
||||
#ifdef CONFIG_SECURITY_PATH
|
||||
struct list_head path_unlink;
|
||||
struct list_head path_mkdir;
|
||||
diff --git a/include/linux/security.h b/include/linux/security.h
|
||||
index 536fafd..a6c6d5d 100644
|
||||
--- a/include/linux/security.h
|
||||
+++ b/include/linux/security.h
|
||||
@@ -242,6 +242,10 @@ int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts);
|
||||
int security_dentry_init_security(struct dentry *dentry, int mode,
|
||||
const struct qstr *name, void **ctx,
|
||||
u32 *ctxlen);
|
||||
+int security_dentry_create_files_as(struct dentry *dentry, int mode,
|
||||
+ struct qstr *name,
|
||||
+ const struct cred *old,
|
||||
+ struct cred *new);
|
||||
|
||||
int security_inode_alloc(struct inode *inode);
|
||||
void security_inode_free(struct inode *inode);
|
||||
@@ -600,6 +604,14 @@ static inline int security_dentry_init_security(struct dentry *dentry,
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
+static inline int security_dentry_create_files_as(struct dentry *dentry,
|
||||
+ int mode, struct qstr *name,
|
||||
+ const struct cred *old,
|
||||
+ struct cred *new)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
|
||||
static inline int security_inode_init_security(struct inode *inode,
|
||||
struct inode *dir,
|
||||
diff --git a/security/security.c b/security/security.c
|
||||
index a9e2bb9..f825304 100644
|
||||
--- a/security/security.c
|
||||
+++ b/security/security.c
|
||||
@@ -364,6 +364,15 @@ int security_dentry_init_security(struct dentry *dentry, int mode,
|
||||
}
|
||||
EXPORT_SYMBOL(security_dentry_init_security);
|
||||
|
||||
+int security_dentry_create_files_as(struct dentry *dentry, int mode,
|
||||
+ struct qstr *name,
|
||||
+ const struct cred *old, struct cred *new)
|
||||
+{
|
||||
+ return call_int_hook(dentry_create_files_as, 0, dentry, mode,
|
||||
+ name, old, new);
|
||||
+}
|
||||
+EXPORT_SYMBOL(security_dentry_create_files_as);
|
||||
+
|
||||
int security_inode_init_security(struct inode *inode, struct inode *dir,
|
||||
const struct qstr *qstr,
|
||||
const initxattrs initxattrs, void *fs_data)
|
||||
@@ -1635,6 +1644,8 @@ struct security_hook_heads security_hook_heads = {
|
||||
LIST_HEAD_INIT(security_hook_heads.sb_parse_opts_str),
|
||||
.dentry_init_security =
|
||||
LIST_HEAD_INIT(security_hook_heads.dentry_init_security),
|
||||
+ .dentry_create_files_as =
|
||||
+ LIST_HEAD_INIT(security_hook_heads.dentry_create_files_as),
|
||||
#ifdef CONFIG_SECURITY_PATH
|
||||
.path_unlink = LIST_HEAD_INIT(security_hook_heads.path_unlink),
|
||||
.path_mkdir = LIST_HEAD_INIT(security_hook_heads.path_mkdir),
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From a518b0a5b0d7f3397e065acb956bca9635aa892d Mon Sep 17 00:00:00 2001
|
||||
From: Vivek Goyal <vgoyal@redhat.com>
|
||||
Date: Wed, 13 Jul 2016 10:44:53 -0400
|
||||
Subject: [PATCH 09/10] selinux: Implement dentry_create_files_as() hook
|
||||
|
||||
Calculate what would be the label of newly created file and set that
|
||||
secid in the passed creds.
|
||||
|
||||
Context of the task which is actually creating file is retrieved from
|
||||
set of creds passed in. (old->security).
|
||||
|
||||
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
|
||||
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/selinux/hooks.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
|
||||
index f9d398b..e15e560 100644
|
||||
--- a/security/selinux/hooks.c
|
||||
+++ b/security/selinux/hooks.c
|
||||
@@ -2848,6 +2848,27 @@ static int selinux_dentry_init_security(struct dentry *dentry, int mode,
|
||||
return security_sid_to_context(newsid, (char **)ctx, ctxlen);
|
||||
}
|
||||
|
||||
+static int selinux_dentry_create_files_as(struct dentry *dentry, int mode,
|
||||
+ struct qstr *name,
|
||||
+ const struct cred *old,
|
||||
+ struct cred *new)
|
||||
+{
|
||||
+ u32 newsid;
|
||||
+ int rc;
|
||||
+ struct task_security_struct *tsec;
|
||||
+
|
||||
+ rc = selinux_determine_inode_label(old->security,
|
||||
+ d_inode(dentry->d_parent), name,
|
||||
+ inode_mode_to_security_class(mode),
|
||||
+ &newsid);
|
||||
+ if (rc)
|
||||
+ return rc;
|
||||
+
|
||||
+ tsec = new->security;
|
||||
+ tsec->create_sid = newsid;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
|
||||
const struct qstr *qstr,
|
||||
const char **name,
|
||||
@@ -6098,6 +6119,7 @@ static struct security_hook_list selinux_hooks[] = {
|
||||
LSM_HOOK_INIT(sb_parse_opts_str, selinux_parse_opts_str),
|
||||
|
||||
LSM_HOOK_INIT(dentry_init_security, selinux_dentry_init_security),
|
||||
+ LSM_HOOK_INIT(dentry_create_files_as, selinux_dentry_create_files_as),
|
||||
|
||||
LSM_HOOK_INIT(inode_alloc_security, selinux_inode_alloc_security),
|
||||
LSM_HOOK_INIT(inode_free_security, selinux_inode_free_security),
|
||||
--
|
||||
2.7.4
|
||||
|
||||
From 348a0db9e69e4c214bf5d7677f17cb99cdc47db0 Mon Sep 17 00:00:00 2001
|
||||
From: William Roberts <william.c.roberts@intel.com>
|
||||
Date: Mon, 15 Aug 2016 12:42:12 -0700
|
||||
Subject: [PATCH 10/10] selinux: drop SECURITY_SELINUX_POLICYDB_VERSION_MAX
|
||||
|
||||
Remove the SECURITY_SELINUX_POLICYDB_VERSION_MAX Kconfig option
|
||||
|
||||
Per: https://github.com/SELinuxProject/selinux/wiki/Kernel-Todo
|
||||
|
||||
This was only needed on Fedora 3 and 4 and just causes issues now,
|
||||
so drop it.
|
||||
|
||||
The MAX and MIN should just be whatever the kernel can support.
|
||||
|
||||
Signed-off-by: William Roberts <william.c.roberts@intel.com>
|
||||
Signed-off-by: Paul Moore <paul@paul-moore.com>
|
||||
---
|
||||
security/selinux/Kconfig | 38 -------------------------------------
|
||||
security/selinux/include/security.h | 4 ----
|
||||
2 files changed, 42 deletions(-)
|
||||
|
||||
diff --git a/security/selinux/Kconfig b/security/selinux/Kconfig
|
||||
index 8691e92..ea7e3ef 100644
|
||||
--- a/security/selinux/Kconfig
|
||||
+++ b/security/selinux/Kconfig
|
||||
@@ -93,41 +93,3 @@ config SECURITY_SELINUX_CHECKREQPROT_VALUE
|
||||
via /selinux/checkreqprot if authorized by policy.
|
||||
|
||||
If you are unsure how to answer this question, answer 0.
|
||||
-
|
||||
-config SECURITY_SELINUX_POLICYDB_VERSION_MAX
|
||||
- bool "NSA SELinux maximum supported policy format version"
|
||||
- depends on SECURITY_SELINUX
|
||||
- default n
|
||||
- help
|
||||
- This option enables the maximum policy format version supported
|
||||
- by SELinux to be set to a particular value. This value is reported
|
||||
- to userspace via /selinux/policyvers and used at policy load time.
|
||||
- It can be adjusted downward to support legacy userland (init) that
|
||||
- does not correctly handle kernels that support newer policy versions.
|
||||
-
|
||||
- Examples:
|
||||
- For the Fedora Core 3 or 4 Linux distributions, enable this option
|
||||
- and set the value via the next option. For Fedora Core 5 and later,
|
||||
- do not enable this option.
|
||||
-
|
||||
- If you are unsure how to answer this question, answer N.
|
||||
-
|
||||
-config SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE
|
||||
- int "NSA SELinux maximum supported policy format version value"
|
||||
- depends on SECURITY_SELINUX_POLICYDB_VERSION_MAX
|
||||
- range 15 23
|
||||
- default 19
|
||||
- help
|
||||
- This option sets the value for the maximum policy format version
|
||||
- supported by SELinux.
|
||||
-
|
||||
- Examples:
|
||||
- For Fedora Core 3, use 18.
|
||||
- For Fedora Core 4, use 19.
|
||||
-
|
||||
- If you are unsure how to answer this question, look for the
|
||||
- policy format version supported by your policy toolchain, by
|
||||
- running 'checkpolicy -V'. Or look at what policy you have
|
||||
- installed under /etc/selinux/$SELINUXTYPE/policy, where
|
||||
- SELINUXTYPE is defined in your /etc/selinux/config.
|
||||
-
|
||||
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h
|
||||
index 38feb55..308a286 100644
|
||||
--- a/security/selinux/include/security.h
|
||||
+++ b/security/selinux/include/security.h
|
||||
@@ -39,11 +39,7 @@
|
||||
|
||||
/* Range of policy versions we understand*/
|
||||
#define POLICYDB_VERSION_MIN POLICYDB_VERSION_BASE
|
||||
-#ifdef CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX
|
||||
-#define POLICYDB_VERSION_MAX CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE
|
||||
-#else
|
||||
#define POLICYDB_VERSION_MAX POLICYDB_VERSION_XPERMS_IOCTL
|
||||
-#endif
|
||||
|
||||
/* Mask for just the mount related flags */
|
||||
#define SE_MNTMASK 0x0f
|
||||
--
|
||||
2.7.4
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
From a8a15723637c6dfbd5042b5c3453d31f5815f044 Mon Sep 17 00:00:00 2001
|
||||
From: "kernel-team@fedoraproject.org" <kernel-team@fedoraproject.org>
|
||||
Date: Thu, 29 Jul 2010 16:46:31 -0700
|
||||
Subject: [PATCH] silence fbcon logo
|
||||
|
@ -5,11 +6,11 @@ Subject: [PATCH] silence fbcon logo
|
|||
Bugzilla: N/A
|
||||
Upstream-status: Fedora mustard
|
||||
---
|
||||
drivers/video/console/fbcon.c | 24 +++++++++++++++++-------
|
||||
1 file changed, 17 insertions(+), 7 deletions(-)
|
||||
drivers/video/console/fbcon.c | 26 +++++++++++++++++++-------
|
||||
1 file changed, 19 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
|
||||
index 658c34bb9076..25ab00980e4c 100644
|
||||
index afd3301ac40c..2e08ba0ade3e 100644
|
||||
--- a/drivers/video/console/fbcon.c
|
||||
+++ b/drivers/video/console/fbcon.c
|
||||
@@ -634,13 +634,15 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
|
||||
|
@ -35,10 +36,12 @@ index 658c34bb9076..25ab00980e4c 100644
|
|||
}
|
||||
}
|
||||
#endif /* MODULE */
|
||||
@@ -3621,6 +3623,14 @@ static int __init fb_console_init(void)
|
||||
return 0;
|
||||
}
|
||||
@@ -3654,6 +3656,16 @@ static void __exit fb_console_exit(void)
|
||||
|
||||
module_exit(fb_console_exit);
|
||||
|
||||
+#else
|
||||
+
|
||||
+static int __init quiet_logo(char *str)
|
||||
+{
|
||||
+ logo_shown = FBCON_LOGO_DONTSHOW;
|
||||
|
@ -47,6 +50,9 @@ index 658c34bb9076..25ab00980e4c 100644
|
|||
+
|
||||
+early_param("quiet", quiet_logo);
|
||||
+
|
||||
fs_initcall(fb_console_init);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE
|
||||
MODULE_LICENSE("GPL");
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
6
sources
6
sources
|
@ -1,3 +1,3 @@
|
|||
5276563eb1f39a048e4a8a887408c031 linux-4.7.tar.xz
|
||||
fe259c02c75eec61d1aa4b1211f3c853 perf-man-4.7.tar.gz
|
||||
150cff5d90bd90217848974269a770ee patch-4.7.4.xz
|
||||
c1af0afbd3df35c1ccdc7a5118cd2d07 linux-4.8.tar.xz
|
||||
0dad03f586e835d538d3e0d2cbdb9a28 perf-man-4.8.tar.gz
|
||||
349734be5387f1605074515ad7207627 patch-4.8.1.xz
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
From 7a3cdd26e6d38031338a6cb591ec2f3faaa9234b Mon Sep 17 00:00:00 2001
|
||||
From 8010b5eb4680df797575e6306d4d891200e303ab Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Garrett <matthew.garrett@nebula.com>
|
||||
Date: Thu, 8 Mar 2012 10:35:59 -0500
|
||||
Subject: [PATCH 03/20] x86: Lock down IO port access when module security is
|
||||
enabled
|
||||
Subject: [PATCH] x86: Lock down IO port access when module security is enabled
|
||||
|
||||
IO port access would permit users to gain access to PCI configuration
|
||||
registers, which in turn (on a lot of hardware) give access to MMIO register
|
||||
|
@ -16,7 +15,7 @@ Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
|
|||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
|
||||
index 37dae792dbbe..1ecc03ca3c15 100644
|
||||
index 589b3193f102..ab8372443efb 100644
|
||||
--- a/arch/x86/kernel/ioport.c
|
||||
+++ b/arch/x86/kernel/ioport.c
|
||||
@@ -15,6 +15,7 @@
|
||||
|
@ -36,7 +35,7 @@ index 37dae792dbbe..1ecc03ca3c15 100644
|
|||
return -EPERM;
|
||||
|
||||
/*
|
||||
@@ -103,7 +104,7 @@ SYSCALL_DEFINE1(iopl, unsigned int, level)
|
||||
@@ -108,7 +109,7 @@ SYSCALL_DEFINE1(iopl, unsigned int, level)
|
||||
return -EINVAL;
|
||||
/* Trying to gain more privileges? */
|
||||
if (level > old) {
|
||||
|
@ -46,7 +45,7 @@ index 37dae792dbbe..1ecc03ca3c15 100644
|
|||
}
|
||||
regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) |
|
||||
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
|
||||
index 6b1721f978c2..53fe675f9bd7 100644
|
||||
index 71025c2f6bbb..86e5bfa91563 100644
|
||||
--- a/drivers/char/mem.c
|
||||
+++ b/drivers/char/mem.c
|
||||
@@ -27,6 +27,7 @@
|
||||
|
@ -68,5 +67,5 @@ index 6b1721f978c2..53fe675f9bd7 100644
|
|||
return -EFAULT;
|
||||
while (count-- > 0 && i < 65536) {
|
||||
--
|
||||
2.4.3
|
||||
2.5.5
|
||||
|
||||
|
|
Loading…
Reference in New Issue