Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus' of git://github.com/openrisc/linux

Pull OpenRISC fixes from Stafford Horne:
"Fixes for compile issues pointed out by kbuild and one bug I found in
initrd with the 5.9 patches"

* tag 'for-linus' of git://github.com/openrisc/linux:
openrisc: Fix issue with get_user for 64-bit values
openrisc: Fix cache API compile issue when not inlining
openrisc: Reserve memblock for initrd

+32 -13
+21 -12
arch/openrisc/include/asm/uaccess.h
··· 165 165 166 166 #define __get_user_nocheck(x, ptr, size) \ 167 167 ({ \ 168 - long __gu_err, __gu_val; \ 169 - __get_user_size(__gu_val, (ptr), (size), __gu_err); \ 170 - (x) = (__force __typeof__(*(ptr)))__gu_val; \ 168 + long __gu_err; \ 169 + __get_user_size((x), (ptr), (size), __gu_err); \ 171 170 __gu_err; \ 172 171 }) 173 172 174 173 #define __get_user_check(x, ptr, size) \ 175 174 ({ \ 176 - long __gu_err = -EFAULT, __gu_val = 0; \ 175 + long __gu_err = -EFAULT; \ 177 176 const __typeof__(*(ptr)) __user *__gu_addr = (ptr); \ 178 - if (access_ok(__gu_addr, size)) \ 179 - __get_user_size(__gu_val, __gu_addr, (size), __gu_err); \ 180 - (x) = (__force __typeof__(*(ptr)))__gu_val; \ 177 + if (access_ok(__gu_addr, size)) \ 178 + __get_user_size((x), __gu_addr, (size), __gu_err); \ 179 + else \ 180 + (x) = (__typeof__(*(ptr))) 0; \ 181 181 __gu_err; \ 182 182 }) 183 183 ··· 191 191 case 2: __get_user_asm(x, ptr, retval, "l.lhz"); break; \ 192 192 case 4: __get_user_asm(x, ptr, retval, "l.lwz"); break; \ 193 193 case 8: __get_user_asm2(x, ptr, retval); break; \ 194 - default: (x) = __get_user_bad(); \ 194 + default: (x) = (__typeof__(*(ptr)))__get_user_bad(); \ 195 195 } \ 196 196 } while (0) 197 197 198 198 #define __get_user_asm(x, addr, err, op) \ 199 + { \ 200 + unsigned long __gu_tmp; \ 199 201 __asm__ __volatile__( \ 200 202 "1: "op" %1,0(%2)\n" \ 201 203 "2:\n" \ ··· 211 209 " .align 2\n" \ 212 210 " .long 1b,3b\n" \ 213 211 ".previous" \ 214 - : "=r"(err), "=r"(x) \ 215 - : "r"(addr), "i"(-EFAULT), "0"(err)) 212 + : "=r"(err), "=r"(__gu_tmp) \ 213 + : "r"(addr), "i"(-EFAULT), "0"(err)); \ 214 + (x) = (__typeof__(*(addr)))__gu_tmp; \ 215 + } 216 216 217 217 #define __get_user_asm2(x, addr, err) \ 218 + { \ 219 + unsigned long long __gu_tmp; \ 218 220 __asm__ __volatile__( \ 219 221 "1: l.lwz %1,0(%2)\n" \ 220 222 "2: l.lwz %H1,4(%2)\n" \ ··· 235 229 " .long 1b,4b\n" \ 236 230 " .long 2b,4b\n" \ 237 231 ".previous" \ 238 - : "=r"(err), "=&r"(x) \ 239 - : "r"(addr), "i"(-EFAULT), "0"(err)) 232 + : "=r"(err), "=&r"(__gu_tmp) \ 233 + : "r"(addr), "i"(-EFAULT), "0"(err)); \ 234 + (x) = (__typeof__(*(addr)))( \ 235 + (__typeof__((x)-(x)))__gu_tmp); \ 236 + } 240 237 241 238 /* more complex routines */ 242 239
+10
arch/openrisc/kernel/setup.c
··· 80 80 */ 81 81 memblock_reserve(__pa(_stext), _end - _stext); 82 82 83 + #ifdef CONFIG_BLK_DEV_INITRD 84 + /* Then reserve the initrd, if any */ 85 + if (initrd_start && (initrd_end > initrd_start)) { 86 + unsigned long aligned_start = ALIGN_DOWN(initrd_start, PAGE_SIZE); 87 + unsigned long aligned_end = ALIGN(initrd_end, PAGE_SIZE); 88 + 89 + memblock_reserve(__pa(aligned_start), aligned_end - aligned_start); 90 + } 91 + #endif /* CONFIG_BLK_DEV_INITRD */ 92 + 83 93 early_init_fdt_reserve_self(); 84 94 early_init_fdt_scan_reserved_mem(); 85 95
+1 -1
arch/openrisc/mm/cache.c
··· 16 16 #include <asm/cacheflush.h> 17 17 #include <asm/tlbflush.h> 18 18 19 - static void cache_loop(struct page *page, const unsigned int reg) 19 + static __always_inline void cache_loop(struct page *page, const unsigned int reg) 20 20 { 21 21 unsigned long paddr = page_to_pfn(page) << PAGE_SHIFT; 22 22 unsigned long line = paddr & ~(L1_CACHE_BYTES - 1);