diff options
Diffstat (limited to 'arch/sh/include/asm')
-rw-r--r-- | arch/sh/include/asm/io.h | 11 | ||||
-rw-r--r-- | arch/sh/include/asm/pgtable_32.h | 5 | ||||
-rw-r--r-- | arch/sh/include/asm/unistd_32.h | 3 | ||||
-rw-r--r-- | arch/sh/include/asm/unistd_64.h | 3 |
4 files changed, 16 insertions, 6 deletions
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index 512cd3e9d0ca..026dd659a640 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -233,11 +233,17 @@ unsigned long long poke_real_address_q(unsigned long long addr, | |||
233 | * doesn't exist, so everything must go through page tables. | 233 | * doesn't exist, so everything must go through page tables. |
234 | */ | 234 | */ |
235 | #ifdef CONFIG_MMU | 235 | #ifdef CONFIG_MMU |
236 | void __iomem *__ioremap(unsigned long offset, unsigned long size, | 236 | void __iomem *__ioremap_caller(unsigned long offset, unsigned long size, |
237 | unsigned long flags); | 237 | unsigned long flags, void *caller); |
238 | void __iounmap(void __iomem *addr); | 238 | void __iounmap(void __iomem *addr); |
239 | 239 | ||
240 | static inline void __iomem * | 240 | static inline void __iomem * |
241 | __ioremap(unsigned long offset, unsigned long size, unsigned long flags) | ||
242 | { | ||
243 | return __ioremap_caller(offset, size, flags, __builtin_return_address(0)); | ||
244 | } | ||
245 | |||
246 | static inline void __iomem * | ||
241 | __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | 247 | __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) |
242 | { | 248 | { |
243 | #if defined(CONFIG_SUPERH32) && !defined(CONFIG_PMB_FIXED) && !defined(CONFIG_PMB) | 249 | #if defined(CONFIG_SUPERH32) && !defined(CONFIG_PMB_FIXED) && !defined(CONFIG_PMB) |
@@ -271,6 +277,7 @@ __ioremap_mode(unsigned long offset, unsigned long size, unsigned long flags) | |||
271 | return __ioremap(offset, size, flags); | 277 | return __ioremap(offset, size, flags); |
272 | } | 278 | } |
273 | #else | 279 | #else |
280 | #define __ioremap(offset, size, flags) ((void __iomem *)(offset)) | ||
274 | #define __ioremap_mode(offset, size, flags) ((void __iomem *)(offset)) | 281 | #define __ioremap_mode(offset, size, flags) ((void __iomem *)(offset)) |
275 | #define __iounmap(addr) do { } while (0) | 282 | #define __iounmap(addr) do { } while (0) |
276 | #endif /* CONFIG_MMU */ | 283 | #endif /* CONFIG_MMU */ |
diff --git a/arch/sh/include/asm/pgtable_32.h b/arch/sh/include/asm/pgtable_32.h index b35435516203..5003ee86f67b 100644 --- a/arch/sh/include/asm/pgtable_32.h +++ b/arch/sh/include/asm/pgtable_32.h | |||
@@ -344,7 +344,8 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
344 | #define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) | 344 | #define pte_special(pte) ((pte).pte_low & _PAGE_SPECIAL) |
345 | 345 | ||
346 | #ifdef CONFIG_X2TLB | 346 | #ifdef CONFIG_X2TLB |
347 | #define pte_write(pte) ((pte).pte_high & _PAGE_EXT_USER_WRITE) | 347 | #define pte_write(pte) \ |
348 | ((pte).pte_high & (_PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE)) | ||
348 | #else | 349 | #else |
349 | #define pte_write(pte) ((pte).pte_low & _PAGE_RW) | 350 | #define pte_write(pte) ((pte).pte_low & _PAGE_RW) |
350 | #endif | 351 | #endif |
@@ -358,7 +359,7 @@ static inline pte_t pte_##fn(pte_t pte) { pte.pte_##h op; return pte; } | |||
358 | * individually toggled (and user permissions are entirely decoupled from | 359 | * individually toggled (and user permissions are entirely decoupled from |
359 | * kernel permissions), we attempt to couple them a bit more sanely here. | 360 | * kernel permissions), we attempt to couple them a bit more sanely here. |
360 | */ | 361 | */ |
361 | PTE_BIT_FUNC(high, wrprotect, &= ~_PAGE_EXT_USER_WRITE); | 362 | PTE_BIT_FUNC(high, wrprotect, &= ~(_PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE)); |
362 | PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); | 363 | PTE_BIT_FUNC(high, mkwrite, |= _PAGE_EXT_USER_WRITE | _PAGE_EXT_KERN_WRITE); |
363 | PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); | 364 | PTE_BIT_FUNC(high, mkhuge, |= _PAGE_SZHUGE); |
364 | #else | 365 | #else |
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/asm/unistd_32.h index f3fd1b9eb6b1..f18c4f9baf27 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/asm/unistd_32.h | |||
@@ -345,8 +345,9 @@ | |||
345 | #define __NR_pwritev 334 | 345 | #define __NR_pwritev 334 |
346 | #define __NR_rt_tgsigqueueinfo 335 | 346 | #define __NR_rt_tgsigqueueinfo 335 |
347 | #define __NR_perf_event_open 336 | 347 | #define __NR_perf_event_open 336 |
348 | #define __NR_recvmmsg 337 | ||
348 | 349 | ||
349 | #define NR_syscalls 337 | 350 | #define NR_syscalls 338 |
350 | 351 | ||
351 | #ifdef __KERNEL__ | 352 | #ifdef __KERNEL__ |
352 | 353 | ||
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/asm/unistd_64.h index 343ce8f073ea..3e7645d11130 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/asm/unistd_64.h | |||
@@ -385,10 +385,11 @@ | |||
385 | #define __NR_pwritev 362 | 385 | #define __NR_pwritev 362 |
386 | #define __NR_rt_tgsigqueueinfo 363 | 386 | #define __NR_rt_tgsigqueueinfo 363 |
387 | #define __NR_perf_event_open 364 | 387 | #define __NR_perf_event_open 364 |
388 | #define __NR_recvmmsg 365 | ||
388 | 389 | ||
389 | #ifdef __KERNEL__ | 390 | #ifdef __KERNEL__ |
390 | 391 | ||
391 | #define NR_syscalls 365 | 392 | #define NR_syscalls 366 |
392 | 393 | ||
393 | #define __ARCH_WANT_IPC_PARSE_VERSION | 394 | #define __ARCH_WANT_IPC_PARSE_VERSION |
394 | #define __ARCH_WANT_OLD_READDIR | 395 | #define __ARCH_WANT_OLD_READDIR |