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 branch 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Fix module loading on system with WB cache
microblaze: export assembly functions used by modules
microblaze: Remove powerpc code from Microblaze port
microblaze: Remove compilation warnings in cache macro
microblaze: export assembly functions used by modules
microblaze: fix get_user/put_user side-effects
microblaze: re-enable interrupts before calling schedule

+89 -20
+69 -18
arch/microblaze/include/asm/uaccess.h
··· 182 182 * Returns zero on success, or -EFAULT on error. 183 183 * On error, the variable @x is set to zero. 184 184 */ 185 + #define get_user(x, ptr) \ 186 + __get_user_check((x), (ptr), sizeof(*(ptr))) 187 + 188 + #define __get_user_check(x, ptr, size) \ 189 + ({ \ 190 + unsigned long __gu_val = 0; \ 191 + const typeof(*(ptr)) __user *__gu_addr = (ptr); \ 192 + int __gu_err = 0; \ 193 + \ 194 + if (access_ok(VERIFY_READ, __gu_addr, size)) { \ 195 + switch (size) { \ 196 + case 1: \ 197 + __get_user_asm("lbu", __gu_addr, __gu_val, \ 198 + __gu_err); \ 199 + break; \ 200 + case 2: \ 201 + __get_user_asm("lhu", __gu_addr, __gu_val, \ 202 + __gu_err); \ 203 + break; \ 204 + case 4: \ 205 + __get_user_asm("lw", __gu_addr, __gu_val, \ 206 + __gu_err); \ 207 + break; \ 208 + default: \ 209 + __gu_err = __user_bad(); \ 210 + break; \ 211 + } \ 212 + } else { \ 213 + __gu_err = -EFAULT; \ 214 + } \ 215 + x = (typeof(*(ptr)))__gu_val; \ 216 + __gu_err; \ 217 + }) 185 218 186 219 #define __get_user(x, ptr) \ 187 220 ({ \ ··· 238 205 __gu_err; \ 239 206 }) 240 207 241 - 242 - #define get_user(x, ptr) \ 243 - ({ \ 244 - access_ok(VERIFY_READ, (ptr), sizeof(*(ptr))) \ 245 - ? __get_user((x), (ptr)) : -EFAULT; \ 246 - }) 247 208 248 209 #define __put_user_asm(insn, __gu_ptr, __gu_val, __gu_err) \ 249 210 ({ \ ··· 293 266 * 294 267 * Returns zero on success, or -EFAULT on error. 295 268 */ 269 + #define put_user(x, ptr) \ 270 + __put_user_check((x), (ptr), sizeof(*(ptr))) 271 + 272 + #define __put_user_check(x, ptr, size) \ 273 + ({ \ 274 + typeof(*(ptr)) __pu_val; \ 275 + typeof(*(ptr)) __user *__pu_addr = (ptr); \ 276 + int __pu_err = 0; \ 277 + \ 278 + __pu_val = (x); \ 279 + if (access_ok(VERIFY_WRITE, __pu_addr, size)) { \ 280 + switch (size) { \ 281 + case 1: \ 282 + __put_user_asm("sb", __pu_addr, __pu_val, \ 283 + __pu_err); \ 284 + break; \ 285 + case 2: \ 286 + __put_user_asm("sh", __pu_addr, __pu_val, \ 287 + __pu_err); \ 288 + break; \ 289 + case 4: \ 290 + __put_user_asm("sw", __pu_addr, __pu_val, \ 291 + __pu_err); \ 292 + break; \ 293 + case 8: \ 294 + __put_user_asm_8(__pu_addr, __pu_val, __pu_err);\ 295 + break; \ 296 + default: \ 297 + __pu_err = __user_bad(); \ 298 + break; \ 299 + } \ 300 + } else { \ 301 + __pu_err = -EFAULT; \ 302 + } \ 303 + __pu_err; \ 304 + }) 296 305 297 306 #define __put_user(x, ptr) \ 298 307 ({ \ ··· 353 290 __gu_err; \ 354 291 }) 355 292 356 - #ifndef CONFIG_MMU 357 - 358 - #define put_user(x, ptr) __put_user((x), (ptr)) 359 - 360 - #else /* CONFIG_MMU */ 361 - 362 - #define put_user(x, ptr) \ 363 - ({ \ 364 - access_ok(VERIFY_WRITE, (ptr), sizeof(*(ptr))) \ 365 - ? __put_user((x), (ptr)) : -EFAULT; \ 366 - }) 367 - #endif /* CONFIG_MMU */ 368 293 369 294 /* copy_to_from_user */ 370 295 #define __copy_from_user(to, from, n) \
+2 -1
arch/microblaze/kernel/cpu/cache.c
··· 137 137 do { \ 138 138 int step = -line_length; \ 139 139 int align = ~(line_length - 1); \ 140 + int count; \ 140 141 end = ((end & align) == end) ? end - line_length : end & align; \ 141 - int count = end - start; \ 142 + count = end - start; \ 142 143 WARN_ON(count < 0); \ 143 144 \ 144 145 __asm__ __volatile__ (" 1: " #op " %0, %1; \
+2
arch/microblaze/kernel/entry-nommu.S
··· 476 476 nop 477 477 478 478 work_pending: 479 + enable_irq 480 + 479 481 andi r11, r19, _TIF_NEED_RESCHED 480 482 beqi r11, 1f 481 483 bralid r15, schedule
+11
arch/microblaze/kernel/microblaze_ksyms.c
··· 52 52 extern void _mcount(void); 53 53 EXPORT_SYMBOL(_mcount); 54 54 #endif 55 + 56 + /* 57 + * Assembly functions that may be used (directly or indirectly) by modules 58 + */ 59 + EXPORT_SYMBOL(__copy_tofrom_user); 60 + EXPORT_SYMBOL(__strncpy_user); 61 + 62 + #ifdef CONFIG_OPT_LIB_ASM 63 + EXPORT_SYMBOL(memcpy); 64 + EXPORT_SYMBOL(memmove); 65 + #endif
+2
arch/microblaze/kernel/module.c
··· 16 16 #include <linux/string.h> 17 17 18 18 #include <asm/pgtable.h> 19 + #include <asm/cacheflush.h> 19 20 20 21 void *module_alloc(unsigned long size) 21 22 { ··· 152 151 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, 153 152 struct module *module) 154 153 { 154 + flush_dcache(); 155 155 return 0; 156 156 } 157 157
+1
arch/microblaze/mm/init.c
··· 47 47 EXPORT_SYMBOL(memory_start); 48 48 unsigned long memory_end; /* due to mm/nommu.c */ 49 49 unsigned long memory_size; 50 + EXPORT_SYMBOL(memory_size); 50 51 51 52 /* 52 53 * paging_init() sets up the page tables - in fact we've already done this.
+1
arch/microblaze/mm/pgtable.c
··· 42 42 43 43 unsigned long ioremap_base; 44 44 unsigned long ioremap_bot; 45 + EXPORT_SYMBOL(ioremap_bot); 45 46 46 47 /* The maximum lowmem defaults to 768Mb, but this can be configured to 47 48 * another value.
+1 -1
arch/microblaze/pci/pci-common.c
··· 1507 1507 pci_bus_add_devices(bus); 1508 1508 1509 1509 /* Fixup EEH */ 1510 - eeh_add_device_tree_late(bus); 1510 + /* eeh_add_device_tree_late(bus); */ 1511 1511 } 1512 1512 EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus); 1513 1513