diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-26 17:39:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-26 17:39:22 -0400 |
commit | ec9c166434595382be3babf266febf876327774d (patch) | |
tree | ff171644f5104e1c3903fa91292220b48f6714db | |
parent | 685f7e4f161425b137056abe35ba8ef7b669d83d (diff) | |
parent | c61c7def1fa0a722610d89790e0255b74f3c07dd (diff) |
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
-rw-r--r-- | arch/mips/include/asm/processor.h | 2 | ||||
-rw-r--r-- | drivers/tc/tc.c | 8 | ||||
-rw-r--r-- | include/linux/tc.h | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h index 49d6046ca1d0..c373eb605040 100644 --- a/arch/mips/include/asm/processor.h +++ b/arch/mips/include/asm/processor.h | |||
@@ -81,7 +81,7 @@ extern unsigned int vced_count, vcei_count; | |||
81 | 81 | ||
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | #define VDSO_RANDOMIZE_SIZE (TASK_IS_32BIT_ADDR ? SZ_1M : SZ_256M) | 84 | #define VDSO_RANDOMIZE_SIZE (TASK_IS_32BIT_ADDR ? SZ_1M : SZ_64M) |
85 | 85 | ||
86 | extern unsigned long mips_stack_top(void); | 86 | extern unsigned long mips_stack_top(void); |
87 | #define STACK_TOP mips_stack_top() | 87 | #define STACK_TOP mips_stack_top() |
diff --git a/drivers/tc/tc.c b/drivers/tc/tc.c index 3be9519654e5..cf3fad2cb871 100644 --- a/drivers/tc/tc.c +++ b/drivers/tc/tc.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * TURBOchannel bus services. | 2 | * TURBOchannel bus services. |
3 | * | 3 | * |
4 | * Copyright (c) Harald Koerfgen, 1998 | 4 | * Copyright (c) Harald Koerfgen, 1998 |
5 | * Copyright (c) 2001, 2003, 2005, 2006 Maciej W. Rozycki | 5 | * Copyright (c) 2001, 2003, 2005, 2006, 2018 Maciej W. Rozycki |
6 | * Copyright (c) 2005 James Simmons | 6 | * Copyright (c) 2005 James Simmons |
7 | * | 7 | * |
8 | * This file is subject to the terms and conditions of the GNU | 8 | * This file is subject to the terms and conditions of the GNU |
@@ -10,6 +10,7 @@ | |||
10 | * directory of this archive for more details. | 10 | * directory of this archive for more details. |
11 | */ | 11 | */ |
12 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
13 | #include <linux/dma-mapping.h> | ||
13 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
14 | #include <linux/init.h> | 15 | #include <linux/init.h> |
15 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
@@ -92,6 +93,11 @@ static void __init tc_bus_add_devices(struct tc_bus *tbus) | |||
92 | tdev->dev.bus = &tc_bus_type; | 93 | tdev->dev.bus = &tc_bus_type; |
93 | tdev->slot = slot; | 94 | tdev->slot = slot; |
94 | 95 | ||
96 | /* TURBOchannel has 34-bit DMA addressing (16GiB space). */ | ||
97 | tdev->dma_mask = DMA_BIT_MASK(34); | ||
98 | tdev->dev.dma_mask = &tdev->dma_mask; | ||
99 | tdev->dev.coherent_dma_mask = DMA_BIT_MASK(34); | ||
100 | |||
95 | for (i = 0; i < 8; i++) { | 101 | for (i = 0; i < 8; i++) { |
96 | tdev->firmware[i] = | 102 | tdev->firmware[i] = |
97 | readb(module + offset + TC_FIRM_VER + 4 * i); | 103 | readb(module + offset + TC_FIRM_VER + 4 * i); |
diff --git a/include/linux/tc.h b/include/linux/tc.h index f92511e57cdb..a60639f37963 100644 --- a/include/linux/tc.h +++ b/include/linux/tc.h | |||
@@ -84,6 +84,7 @@ struct tc_dev { | |||
84 | device. */ | 84 | device. */ |
85 | struct device dev; /* Generic device interface. */ | 85 | struct device dev; /* Generic device interface. */ |
86 | struct resource resource; /* Address space of this device. */ | 86 | struct resource resource; /* Address space of this device. */ |
87 | u64 dma_mask; /* DMA addressable range. */ | ||
87 | char vendor[9]; | 88 | char vendor[9]; |
88 | char name[9]; | 89 | char name[9]; |
89 | char firmware[9]; | 90 | char firmware[9]; |