drm/i915/gvt: Align render mmio list to cacheline
authorChangbin Du <changbin.du@intel.com>
Thu, 6 Apr 2017 02:55:02 +0000 (10:55 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 12 Apr 2017 05:57:42 +0000 (13:57 +0800)
Make the global mmio list be cacheline aligned to improve performance.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/render.c

index e24e57afc45e8a9d83e7519c7c69d3cd3cf95555..679411fe653ff9953a782a8c167b286def30f6cc 100644 (file)
@@ -44,7 +44,7 @@ struct render_mmio {
        u32 value;
 };
 
-static struct render_mmio gen8_render_mmio_list[] = {
+static struct render_mmio gen8_render_mmio_list[] __cacheline_aligned = {
        {RCS, _MMIO(0x229c), 0xffff, false},
        {RCS, _MMIO(0x2248), 0x0, false},
        {RCS, _MMIO(0x2098), 0x0, false},
@@ -75,7 +75,7 @@ static struct render_mmio gen8_render_mmio_list[] = {
        {BCS, _MMIO(0x22028), 0x0, false},
 };
 
-static struct render_mmio gen9_render_mmio_list[] = {
+static struct render_mmio gen9_render_mmio_list[] __cacheline_aligned = {
        {RCS, _MMIO(0x229c), 0xffff, false},
        {RCS, _MMIO(0x2248), 0x0, false},
        {RCS, _MMIO(0x2098), 0x0, false},