Commit ec9c1664 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'mips_fixes_4.20_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fixes from Paul Burton:
 "A couple of MIPS fixes that should have ideally made it for v4.19, but
  hey-ho here they are now:

   - A fix for potential poor stack placement introduced in v4.19-rc8.

   - A fix for a warning introduced in use of TURBOchannel devices by
     DMA changes in v4.16"

* tag 'mips_fixes_4.20_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  MIPS: VDSO: Reduce VDSO_RANDOMIZE_SIZE to 64MB for 64bit
  TC: Set DMA masks for devices
parents 685f7e4f c61c7def
...@@ -81,7 +81,7 @@ extern unsigned int vced_count, vcei_count; ...@@ -81,7 +81,7 @@ extern unsigned int vced_count, vcei_count;
#endif #endif
#define VDSO_RANDOMIZE_SIZE (TASK_IS_32BIT_ADDR ? SZ_1M : SZ_256M) #define VDSO_RANDOMIZE_SIZE (TASK_IS_32BIT_ADDR ? SZ_1M : SZ_64M)
extern unsigned long mips_stack_top(void); extern unsigned long mips_stack_top(void);
#define STACK_TOP mips_stack_top() #define STACK_TOP mips_stack_top()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* TURBOchannel bus services. * TURBOchannel bus services.
* *
* Copyright (c) Harald Koerfgen, 1998 * Copyright (c) Harald Koerfgen, 1998
* Copyright (c) 2001, 2003, 2005, 2006 Maciej W. Rozycki * Copyright (c) 2001, 2003, 2005, 2006, 2018 Maciej W. Rozycki
* Copyright (c) 2005 James Simmons * Copyright (c) 2005 James Simmons
* *
* This file is subject to the terms and conditions of the GNU * This file is subject to the terms and conditions of the GNU
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
* directory of this archive for more details. * directory of this archive for more details.
*/ */
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/dma-mapping.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/ioport.h> #include <linux/ioport.h>
...@@ -92,6 +93,11 @@ static void __init tc_bus_add_devices(struct tc_bus *tbus) ...@@ -92,6 +93,11 @@ static void __init tc_bus_add_devices(struct tc_bus *tbus)
tdev->dev.bus = &tc_bus_type; tdev->dev.bus = &tc_bus_type;
tdev->slot = slot; tdev->slot = slot;
/* TURBOchannel has 34-bit DMA addressing (16GiB space). */
tdev->dma_mask = DMA_BIT_MASK(34);
tdev->dev.dma_mask = &tdev->dma_mask;
tdev->dev.coherent_dma_mask = DMA_BIT_MASK(34);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
tdev->firmware[i] = tdev->firmware[i] =
readb(module + offset + TC_FIRM_VER + 4 * i); readb(module + offset + TC_FIRM_VER + 4 * i);
......
...@@ -84,6 +84,7 @@ struct tc_dev { ...@@ -84,6 +84,7 @@ struct tc_dev {
device. */ device. */
struct device dev; /* Generic device interface. */ struct device dev; /* Generic device interface. */
struct resource resource; /* Address space of this device. */ struct resource resource; /* Address space of this device. */
u64 dma_mask; /* DMA addressable range. */
char vendor[9]; char vendor[9];
char name[9]; char name[9];
char firmware[9]; char firmware[9];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment