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 'parisc' of master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6

+245 -649
+10 -2
CREDITS
··· 611 611 N: Randolph Chung 612 612 E: tausq@debian.org 613 613 D: Linux/PA-RISC hacker 614 - S: Los Altos, CA 94022 615 - S: USA 614 + S: Hong Kong 616 615 617 616 N: Juan Jose Ciarlante 618 617 W: http://juanjox.kernelnotes.org/ ··· 3403 3404 S: Chudenicka 8 3404 3405 S: 10200 Prague 10, Hostivar 3405 3406 S: Czech Republic 3407 + 3408 + N: Thibaut Varene 3409 + E: T-Bone@parisc-linux.org 3410 + W: http://www.parisc-linux.org/ 3411 + P: 1024D/B7D2F063 E67C 0D43 A75E 12A5 BB1C FA2F 1E32 C3DA B7D2 F063 3412 + D: PA-RISC port minion, PDC and GSCPS2 drivers, debuglocks and other bits 3413 + D: Some bits in an ARM port, S1D13XXX FB driver, random patches here and there 3414 + D: AD1889 sound driver 3415 + S: Paris, France 3406 3416 3407 3417 N: Heikki Vatiainen 3408 3418 E: hessu@cs.tut.fi
+6 -2
arch/parisc/kernel/drivers.c
··· 499 499 500 500 dev = create_parisc_device(mod_path); 501 501 if (dev->id.hw_type != HPHW_FAULTY) { 502 - printk("Two devices have hardware path %s. Please file a bug with HP.\n" 503 - "In the meantime, you could try rearranging your cards.\n", parisc_pathname(dev)); 502 + printk(KERN_ERR "Two devices have hardware path [%s]. " 503 + "IODC data for second device: " 504 + "%02x%02x%02x%02x%02x%02x\n" 505 + "Rearranging GSC cards sometimes helps\n", 506 + parisc_pathname(dev), iodc_data[0], iodc_data[1], 507 + iodc_data[3], iodc_data[4], iodc_data[5], iodc_data[6]); 504 508 return NULL; 505 509 } 506 510
+1
arch/parisc/kernel/entry.S
··· 1846 1846 ldo -16(%r30),%r29 /* Reference param save area */ 1847 1847 #endif 1848 1848 1849 + /* WARNING - Clobbers r19 and r21, userspace must save these! */ 1849 1850 STREG %r2,PT_GR19(%r1) /* save for child */ 1850 1851 STREG %r30,PT_GR21(%r1) 1851 1852 BL sys_clone,%r2
+1 -1
arch/parisc/kernel/inventory.c
··· 188 188 temp = pa_pdc_cell.cba; 189 189 dev = alloc_pa_dev(PAT_GET_CBA(temp), &pa_pdc_cell.mod_path); 190 190 if (!dev) { 191 - return PDC_NE_MOD; 191 + return PDC_OK; 192 192 } 193 193 194 194 /* alloc_pa_dev sets dev->hpa */
-546
arch/parisc/kernel/ioctl32.c
··· 19 19 #define CODE 20 20 #include "compat_ioctl.c" 21 21 22 - /* Use this to get at 32-bit user passed pointers. 23 - See sys_sparc32.c for description about these. */ 24 - #define A(__x) ((unsigned long)(__x)) 25 - /* The same for use with copy_from_user() and copy_to_user(). */ 26 - #define B(__x) ((void *)(unsigned long)(__x)) 27 - 28 - #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE) 29 - /* This really belongs in include/linux/drm.h -DaveM */ 30 - #include "../../../drivers/char/drm/drm.h" 31 - 32 - typedef struct drm32_version { 33 - int version_major; /* Major version */ 34 - int version_minor; /* Minor version */ 35 - int version_patchlevel;/* Patch level */ 36 - int name_len; /* Length of name buffer */ 37 - u32 name; /* Name of driver */ 38 - int date_len; /* Length of date buffer */ 39 - u32 date; /* User-space buffer to hold date */ 40 - int desc_len; /* Length of desc buffer */ 41 - u32 desc; /* User-space buffer to hold desc */ 42 - } drm32_version_t; 43 - #define DRM32_IOCTL_VERSION DRM_IOWR(0x00, drm32_version_t) 44 - 45 - static int drm32_version(unsigned int fd, unsigned int cmd, unsigned long arg) 46 - { 47 - drm32_version_t *uversion = (drm32_version_t *)arg; 48 - char *name_ptr, *date_ptr, *desc_ptr; 49 - u32 tmp1, tmp2, tmp3; 50 - drm_version_t kversion; 51 - mm_segment_t old_fs; 52 - int ret; 53 - 54 - memset(&kversion, 0, sizeof(kversion)); 55 - if (get_user(kversion.name_len, &uversion->name_len) || 56 - get_user(kversion.date_len, &uversion->date_len) || 57 - get_user(kversion.desc_len, &uversion->desc_len) || 58 - get_user(tmp1, &uversion->name) || 59 - get_user(tmp2, &uversion->date) || 60 - get_user(tmp3, &uversion->desc)) 61 - return -EFAULT; 62 - 63 - name_ptr = (char *) A(tmp1); 64 - date_ptr = (char *) A(tmp2); 65 - desc_ptr = (char *) A(tmp3); 66 - 67 - ret = -ENOMEM; 68 - if (kversion.name_len && name_ptr) { 69 - kversion.name = kmalloc(kversion.name_len, GFP_KERNEL); 70 - if (!kversion.name) 71 - goto out; 72 - } 73 - if (kversion.date_len && date_ptr) { 74 - kversion.date = kmalloc(kversion.date_len, GFP_KERNEL); 75 - if (!kversion.date) 76 - goto out; 77 - } 78 - if (kversion.desc_len && desc_ptr) { 79 - kversion.desc = kmalloc(kversion.desc_len, GFP_KERNEL); 80 - if (!kversion.desc) 81 - goto out; 82 - } 83 - 84 - old_fs = get_fs(); 85 - set_fs(KERNEL_DS); 86 - ret = sys_ioctl (fd, DRM_IOCTL_VERSION, (unsigned long)&kversion); 87 - set_fs(old_fs); 88 - 89 - if (!ret) { 90 - if ((kversion.name && 91 - copy_to_user(name_ptr, kversion.name, kversion.name_len)) || 92 - (kversion.date && 93 - copy_to_user(date_ptr, kversion.date, kversion.date_len)) || 94 - (kversion.desc && 95 - copy_to_user(desc_ptr, kversion.desc, kversion.desc_len))) 96 - ret = -EFAULT; 97 - if (put_user(kversion.version_major, &uversion->version_major) || 98 - put_user(kversion.version_minor, &uversion->version_minor) || 99 - put_user(kversion.version_patchlevel, &uversion->version_patchlevel) || 100 - put_user(kversion.name_len, &uversion->name_len) || 101 - put_user(kversion.date_len, &uversion->date_len) || 102 - put_user(kversion.desc_len, &uversion->desc_len)) 103 - ret = -EFAULT; 104 - } 105 - 106 - out: 107 - kfree(kversion.name); 108 - kfree(kversion.date); 109 - kfree(kversion.desc); 110 - return ret; 111 - } 112 - 113 - typedef struct drm32_unique { 114 - int unique_len; /* Length of unique */ 115 - u32 unique; /* Unique name for driver instantiation */ 116 - } drm32_unique_t; 117 - #define DRM32_IOCTL_GET_UNIQUE DRM_IOWR(0x01, drm32_unique_t) 118 - #define DRM32_IOCTL_SET_UNIQUE DRM_IOW( 0x10, drm32_unique_t) 119 - 120 - static int drm32_getsetunique(unsigned int fd, unsigned int cmd, unsigned long arg) 121 - { 122 - drm32_unique_t *uarg = (drm32_unique_t *)arg; 123 - drm_unique_t karg; 124 - mm_segment_t old_fs; 125 - char *uptr; 126 - u32 tmp; 127 - int ret; 128 - 129 - if (get_user(karg.unique_len, &uarg->unique_len)) 130 - return -EFAULT; 131 - karg.unique = NULL; 132 - 133 - if (get_user(tmp, &uarg->unique)) 134 - return -EFAULT; 135 - 136 - uptr = (char *) A(tmp); 137 - 138 - if (uptr) { 139 - karg.unique = kmalloc(karg.unique_len, GFP_KERNEL); 140 - if (!karg.unique) 141 - return -ENOMEM; 142 - if (cmd == DRM32_IOCTL_SET_UNIQUE && 143 - copy_from_user(karg.unique, uptr, karg.unique_len)) { 144 - kfree(karg.unique); 145 - return -EFAULT; 146 - } 147 - } 148 - 149 - old_fs = get_fs(); 150 - set_fs(KERNEL_DS); 151 - if (cmd == DRM32_IOCTL_GET_UNIQUE) 152 - ret = sys_ioctl (fd, DRM_IOCTL_GET_UNIQUE, (unsigned long)&karg); 153 - else 154 - ret = sys_ioctl (fd, DRM_IOCTL_SET_UNIQUE, (unsigned long)&karg); 155 - set_fs(old_fs); 156 - 157 - if (!ret) { 158 - if (cmd == DRM32_IOCTL_GET_UNIQUE && 159 - uptr != NULL && 160 - copy_to_user(uptr, karg.unique, karg.unique_len)) 161 - ret = -EFAULT; 162 - if (put_user(karg.unique_len, &uarg->unique_len)) 163 - ret = -EFAULT; 164 - } 165 - 166 - kfree(karg.unique); 167 - return ret; 168 - } 169 - 170 - typedef struct drm32_map { 171 - u32 offset; /* Requested physical address (0 for SAREA)*/ 172 - u32 size; /* Requested physical size (bytes) */ 173 - drm_map_type_t type; /* Type of memory to map */ 174 - drm_map_flags_t flags; /* Flags */ 175 - u32 handle; /* User-space: "Handle" to pass to mmap */ 176 - /* Kernel-space: kernel-virtual address */ 177 - int mtrr; /* MTRR slot used */ 178 - /* Private data */ 179 - } drm32_map_t; 180 - #define DRM32_IOCTL_ADD_MAP DRM_IOWR(0x15, drm32_map_t) 181 - 182 - static int drm32_addmap(unsigned int fd, unsigned int cmd, unsigned long arg) 183 - { 184 - drm32_map_t *uarg = (drm32_map_t *) arg; 185 - drm_map_t karg; 186 - mm_segment_t old_fs; 187 - u32 tmp; 188 - int ret; 189 - 190 - ret = get_user(karg.offset, &uarg->offset); 191 - ret |= get_user(karg.size, &uarg->size); 192 - ret |= get_user(karg.type, &uarg->type); 193 - ret |= get_user(karg.flags, &uarg->flags); 194 - ret |= get_user(tmp, &uarg->handle); 195 - ret |= get_user(karg.mtrr, &uarg->mtrr); 196 - if (ret) 197 - return -EFAULT; 198 - 199 - karg.handle = (void *) A(tmp); 200 - 201 - old_fs = get_fs(); 202 - set_fs(KERNEL_DS); 203 - ret = sys_ioctl(fd, DRM_IOCTL_ADD_MAP, (unsigned long) &karg); 204 - set_fs(old_fs); 205 - 206 - if (!ret) { 207 - ret = put_user(karg.offset, &uarg->offset); 208 - ret |= put_user(karg.size, &uarg->size); 209 - ret |= put_user(karg.type, &uarg->type); 210 - ret |= put_user(karg.flags, &uarg->flags); 211 - tmp = (u32) (long)karg.handle; 212 - ret |= put_user(tmp, &uarg->handle); 213 - ret |= put_user(karg.mtrr, &uarg->mtrr); 214 - if (ret) 215 - ret = -EFAULT; 216 - } 217 - 218 - return ret; 219 - } 220 - 221 - typedef struct drm32_buf_info { 222 - int count; /* Entries in list */ 223 - u32 list; /* (drm_buf_desc_t *) */ 224 - } drm32_buf_info_t; 225 - #define DRM32_IOCTL_INFO_BUFS DRM_IOWR(0x18, drm32_buf_info_t) 226 - 227 - static int drm32_info_bufs(unsigned int fd, unsigned int cmd, unsigned long arg) 228 - { 229 - drm32_buf_info_t *uarg = (drm32_buf_info_t *)arg; 230 - drm_buf_desc_t *ulist; 231 - drm_buf_info_t karg; 232 - mm_segment_t old_fs; 233 - int orig_count, ret; 234 - u32 tmp; 235 - 236 - if (get_user(karg.count, &uarg->count) || 237 - get_user(tmp, &uarg->list)) 238 - return -EFAULT; 239 - 240 - ulist = (drm_buf_desc_t *) A(tmp); 241 - 242 - orig_count = karg.count; 243 - 244 - karg.list = kmalloc(karg.count * sizeof(drm_buf_desc_t), GFP_KERNEL); 245 - if (!karg.list) 246 - return -EFAULT; 247 - 248 - old_fs = get_fs(); 249 - set_fs(KERNEL_DS); 250 - ret = sys_ioctl(fd, DRM_IOCTL_INFO_BUFS, (unsigned long) &karg); 251 - set_fs(old_fs); 252 - 253 - if (!ret) { 254 - if (karg.count <= orig_count && 255 - (copy_to_user(ulist, karg.list, 256 - karg.count * sizeof(drm_buf_desc_t)))) 257 - ret = -EFAULT; 258 - if (put_user(karg.count, &uarg->count)) 259 - ret = -EFAULT; 260 - } 261 - 262 - kfree(karg.list); 263 - return ret; 264 - } 265 - 266 - typedef struct drm32_buf_free { 267 - int count; 268 - u32 list; /* (int *) */ 269 - } drm32_buf_free_t; 270 - #define DRM32_IOCTL_FREE_BUFS DRM_IOW( 0x1a, drm32_buf_free_t) 271 - 272 - static int drm32_free_bufs(unsigned int fd, unsigned int cmd, unsigned long arg) 273 - { 274 - drm32_buf_free_t *uarg = (drm32_buf_free_t *)arg; 275 - drm_buf_free_t karg; 276 - mm_segment_t old_fs; 277 - int *ulist; 278 - int ret; 279 - u32 tmp; 280 - 281 - if (get_user(karg.count, &uarg->count) || 282 - get_user(tmp, &uarg->list)) 283 - return -EFAULT; 284 - 285 - ulist = (int *) A(tmp); 286 - 287 - karg.list = kmalloc(karg.count * sizeof(int), GFP_KERNEL); 288 - if (!karg.list) 289 - return -ENOMEM; 290 - 291 - ret = -EFAULT; 292 - if (copy_from_user(karg.list, ulist, (karg.count * sizeof(int)))) 293 - goto out; 294 - 295 - old_fs = get_fs(); 296 - set_fs(KERNEL_DS); 297 - ret = sys_ioctl(fd, DRM_IOCTL_FREE_BUFS, (unsigned long) &karg); 298 - set_fs(old_fs); 299 - 300 - out: 301 - kfree(karg.list); 302 - return ret; 303 - } 304 - 305 - typedef struct drm32_buf_pub { 306 - int idx; /* Index into master buflist */ 307 - int total; /* Buffer size */ 308 - int used; /* Amount of buffer in use (for DMA) */ 309 - u32 address; /* Address of buffer (void *) */ 310 - } drm32_buf_pub_t; 311 - 312 - typedef struct drm32_buf_map { 313 - int count; /* Length of buflist */ 314 - u32 virtual; /* Mmaped area in user-virtual (void *) */ 315 - u32 list; /* Buffer information (drm_buf_pub_t *) */ 316 - } drm32_buf_map_t; 317 - #define DRM32_IOCTL_MAP_BUFS DRM_IOWR(0x19, drm32_buf_map_t) 318 - 319 - static int drm32_map_bufs(unsigned int fd, unsigned int cmd, unsigned long arg) 320 - { 321 - drm32_buf_map_t *uarg = (drm32_buf_map_t *)arg; 322 - drm32_buf_pub_t *ulist; 323 - drm_buf_map_t karg; 324 - mm_segment_t old_fs; 325 - int orig_count, ret, i; 326 - u32 tmp1, tmp2; 327 - 328 - if (get_user(karg.count, &uarg->count) || 329 - get_user(tmp1, &uarg->virtual) || 330 - get_user(tmp2, &uarg->list)) 331 - return -EFAULT; 332 - 333 - karg.virtual = (void *) A(tmp1); 334 - ulist = (drm32_buf_pub_t *) A(tmp2); 335 - 336 - orig_count = karg.count; 337 - 338 - karg.list = kmalloc(karg.count * sizeof(drm_buf_pub_t), GFP_KERNEL); 339 - if (!karg.list) 340 - return -ENOMEM; 341 - 342 - ret = -EFAULT; 343 - for (i = 0; i < karg.count; i++) { 344 - if (get_user(karg.list[i].idx, &ulist[i].idx) || 345 - get_user(karg.list[i].total, &ulist[i].total) || 346 - get_user(karg.list[i].used, &ulist[i].used) || 347 - get_user(tmp1, &ulist[i].address)) 348 - goto out; 349 - 350 - karg.list[i].address = (void *) A(tmp1); 351 - } 352 - 353 - old_fs = get_fs(); 354 - set_fs(KERNEL_DS); 355 - ret = sys_ioctl(fd, DRM_IOCTL_MAP_BUFS, (unsigned long) &karg); 356 - set_fs(old_fs); 357 - 358 - if (!ret) { 359 - for (i = 0; i < orig_count; i++) { 360 - tmp1 = (u32) (long) karg.list[i].address; 361 - if (put_user(karg.list[i].idx, &ulist[i].idx) || 362 - put_user(karg.list[i].total, &ulist[i].total) || 363 - put_user(karg.list[i].used, &ulist[i].used) || 364 - put_user(tmp1, &ulist[i].address)) { 365 - ret = -EFAULT; 366 - goto out; 367 - } 368 - } 369 - if (put_user(karg.count, &uarg->count)) 370 - ret = -EFAULT; 371 - } 372 - 373 - out: 374 - kfree(karg.list); 375 - return ret; 376 - } 377 - 378 - typedef struct drm32_dma { 379 - /* Indices here refer to the offset into 380 - buflist in drm_buf_get_t. */ 381 - int context; /* Context handle */ 382 - int send_count; /* Number of buffers to send */ 383 - u32 send_indices; /* List of handles to buffers (int *) */ 384 - u32 send_sizes; /* Lengths of data to send (int *) */ 385 - drm_dma_flags_t flags; /* Flags */ 386 - int request_count; /* Number of buffers requested */ 387 - int request_size; /* Desired size for buffers */ 388 - u32 request_indices; /* Buffer information (int *) */ 389 - u32 request_sizes; /* (int *) */ 390 - int granted_count; /* Number of buffers granted */ 391 - } drm32_dma_t; 392 - #define DRM32_IOCTL_DMA DRM_IOWR(0x29, drm32_dma_t) 393 - 394 - /* RED PEN The DRM layer blindly dereferences the send/request 395 - * indice/size arrays even though they are userland 396 - * pointers. -DaveM 397 - */ 398 - static int drm32_dma(unsigned int fd, unsigned int cmd, unsigned long arg) 399 - { 400 - drm32_dma_t *uarg = (drm32_dma_t *) arg; 401 - int *u_si, *u_ss, *u_ri, *u_rs; 402 - drm_dma_t karg; 403 - mm_segment_t old_fs; 404 - int ret; 405 - u32 tmp1, tmp2, tmp3, tmp4; 406 - 407 - karg.send_indices = karg.send_sizes = NULL; 408 - karg.request_indices = karg.request_sizes = NULL; 409 - 410 - if (get_user(karg.context, &uarg->context) || 411 - get_user(karg.send_count, &uarg->send_count) || 412 - get_user(tmp1, &uarg->send_indices) || 413 - get_user(tmp2, &uarg->send_sizes) || 414 - get_user(karg.flags, &uarg->flags) || 415 - get_user(karg.request_count, &uarg->request_count) || 416 - get_user(karg.request_size, &uarg->request_size) || 417 - get_user(tmp3, &uarg->request_indices) || 418 - get_user(tmp4, &uarg->request_sizes) || 419 - get_user(karg.granted_count, &uarg->granted_count)) 420 - return -EFAULT; 421 - 422 - u_si = (int *) A(tmp1); 423 - u_ss = (int *) A(tmp2); 424 - u_ri = (int *) A(tmp3); 425 - u_rs = (int *) A(tmp4); 426 - 427 - if (karg.send_count) { 428 - karg.send_indices = kmalloc(karg.send_count * sizeof(int), GFP_KERNEL); 429 - karg.send_sizes = kmalloc(karg.send_count * sizeof(int), GFP_KERNEL); 430 - 431 - ret = -ENOMEM; 432 - if (!karg.send_indices || !karg.send_sizes) 433 - goto out; 434 - 435 - ret = -EFAULT; 436 - if (copy_from_user(karg.send_indices, u_si, 437 - (karg.send_count * sizeof(int))) || 438 - copy_from_user(karg.send_sizes, u_ss, 439 - (karg.send_count * sizeof(int)))) 440 - goto out; 441 - } 442 - 443 - if (karg.request_count) { 444 - karg.request_indices = kmalloc(karg.request_count * sizeof(int), GFP_KERNEL); 445 - karg.request_sizes = kmalloc(karg.request_count * sizeof(int), GFP_KERNEL); 446 - 447 - ret = -ENOMEM; 448 - if (!karg.request_indices || !karg.request_sizes) 449 - goto out; 450 - 451 - ret = -EFAULT; 452 - if (copy_from_user(karg.request_indices, u_ri, 453 - (karg.request_count * sizeof(int))) || 454 - copy_from_user(karg.request_sizes, u_rs, 455 - (karg.request_count * sizeof(int)))) 456 - goto out; 457 - } 458 - 459 - old_fs = get_fs(); 460 - set_fs(KERNEL_DS); 461 - ret = sys_ioctl(fd, DRM_IOCTL_DMA, (unsigned long) &karg); 462 - set_fs(old_fs); 463 - 464 - if (!ret) { 465 - if (put_user(karg.context, &uarg->context) || 466 - put_user(karg.send_count, &uarg->send_count) || 467 - put_user(karg.flags, &uarg->flags) || 468 - put_user(karg.request_count, &uarg->request_count) || 469 - put_user(karg.request_size, &uarg->request_size) || 470 - put_user(karg.granted_count, &uarg->granted_count)) 471 - ret = -EFAULT; 472 - 473 - if (karg.send_count) { 474 - if (copy_to_user(u_si, karg.send_indices, 475 - (karg.send_count * sizeof(int))) || 476 - copy_to_user(u_ss, karg.send_sizes, 477 - (karg.send_count * sizeof(int)))) 478 - ret = -EFAULT; 479 - } 480 - if (karg.request_count) { 481 - if (copy_to_user(u_ri, karg.request_indices, 482 - (karg.request_count * sizeof(int))) || 483 - copy_to_user(u_rs, karg.request_sizes, 484 - (karg.request_count * sizeof(int)))) 485 - ret = -EFAULT; 486 - } 487 - } 488 - 489 - out: 490 - kfree(karg.send_indices); 491 - kfree(karg.send_sizes); 492 - kfree(karg.request_indices); 493 - kfree(karg.request_sizes); 494 - return ret; 495 - } 496 - 497 - typedef struct drm32_ctx_res { 498 - int count; 499 - u32 contexts; /* (drm_ctx_t *) */ 500 - } drm32_ctx_res_t; 501 - #define DRM32_IOCTL_RES_CTX DRM_IOWR(0x26, drm32_ctx_res_t) 502 - 503 - static int drm32_res_ctx(unsigned int fd, unsigned int cmd, unsigned long arg) 504 - { 505 - drm32_ctx_res_t *uarg = (drm32_ctx_res_t *) arg; 506 - drm_ctx_t *ulist; 507 - drm_ctx_res_t karg; 508 - mm_segment_t old_fs; 509 - int orig_count, ret; 510 - u32 tmp; 511 - 512 - karg.contexts = NULL; 513 - if (get_user(karg.count, &uarg->count) || 514 - get_user(tmp, &uarg->contexts)) 515 - return -EFAULT; 516 - 517 - ulist = (drm_ctx_t *) A(tmp); 518 - 519 - orig_count = karg.count; 520 - if (karg.count && ulist) { 521 - karg.contexts = kmalloc((karg.count * sizeof(drm_ctx_t)), GFP_KERNEL); 522 - if (!karg.contexts) 523 - return -ENOMEM; 524 - if (copy_from_user(karg.contexts, ulist, 525 - (karg.count * sizeof(drm_ctx_t)))) { 526 - kfree(karg.contexts); 527 - return -EFAULT; 528 - } 529 - } 530 - 531 - old_fs = get_fs(); 532 - set_fs(KERNEL_DS); 533 - ret = sys_ioctl(fd, DRM_IOCTL_RES_CTX, (unsigned long) &karg); 534 - set_fs(old_fs); 535 - 536 - if (!ret) { 537 - if (orig_count) { 538 - if (copy_to_user(ulist, karg.contexts, 539 - (orig_count * sizeof(drm_ctx_t)))) 540 - ret = -EFAULT; 541 - } 542 - if (put_user(karg.count, &uarg->count)) 543 - ret = -EFAULT; 544 - } 545 - 546 - kfree(karg.contexts); 547 - return ret; 548 - } 549 - 550 - #endif 551 - 552 22 #define HANDLE_IOCTL(cmd, handler) { cmd, (ioctl_trans_handler_t)handler, NULL }, 553 23 #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL(cmd, sys_ioctl) 554 24 ··· 30 560 31 561 #define DECLARES 32 562 #include "compat_ioctl.c" 33 - 34 - /* PA-specific ioctls */ 35 - COMPATIBLE_IOCTL(PA_PERF_ON) 36 - COMPATIBLE_IOCTL(PA_PERF_OFF) 37 - COMPATIBLE_IOCTL(PA_PERF_VERSION) 38 563 39 564 /* And these ioctls need translation */ 40 565 HANDLE_IOCTL(SIOCGPPPSTATS, dev_ifsioc) ··· 55 590 COMPATIBLE_IOCTL(RTC_EPOCH_SET) 56 591 #endif 57 592 58 - #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE) 59 - HANDLE_IOCTL(DRM32_IOCTL_VERSION, drm32_version); 60 - HANDLE_IOCTL(DRM32_IOCTL_GET_UNIQUE, drm32_getsetunique); 61 - HANDLE_IOCTL(DRM32_IOCTL_SET_UNIQUE, drm32_getsetunique); 62 - HANDLE_IOCTL(DRM32_IOCTL_ADD_MAP, drm32_addmap); 63 - HANDLE_IOCTL(DRM32_IOCTL_INFO_BUFS, drm32_info_bufs); 64 - HANDLE_IOCTL(DRM32_IOCTL_FREE_BUFS, drm32_free_bufs); 65 - HANDLE_IOCTL(DRM32_IOCTL_MAP_BUFS, drm32_map_bufs); 66 - HANDLE_IOCTL(DRM32_IOCTL_DMA, drm32_dma); 67 - HANDLE_IOCTL(DRM32_IOCTL_RES_CTX, drm32_res_ctx); 68 - #endif /* DRM */ 69 593 IOCTL_TABLE_END 70 594 71 595 int ioctl_table_size = ARRAY_SIZE(ioctl_start);
+92 -18
arch/parisc/kernel/irq.c
··· 30 30 #include <linux/seq_file.h> 31 31 #include <linux/spinlock.h> 32 32 #include <linux/types.h> 33 + #include <asm/io.h> 34 + 35 + #include <asm/smp.h> 33 36 34 37 #undef PARISC_IRQ_CR16_COUNTS 35 38 ··· 46 43 */ 47 44 static volatile unsigned long cpu_eiem = 0; 48 45 49 - static void cpu_set_eiem(void *info) 50 - { 51 - set_eiem((unsigned long) info); 52 - } 53 - 54 - static inline void cpu_disable_irq(unsigned int irq) 46 + static void cpu_disable_irq(unsigned int irq) 55 47 { 56 48 unsigned long eirr_bit = EIEM_MASK(irq); 57 49 58 50 cpu_eiem &= ~eirr_bit; 59 - on_each_cpu(cpu_set_eiem, (void *) cpu_eiem, 1, 1); 51 + /* Do nothing on the other CPUs. If they get this interrupt, 52 + * The & cpu_eiem in the do_cpu_irq_mask() ensures they won't 53 + * handle it, and the set_eiem() at the bottom will ensure it 54 + * then gets disabled */ 60 55 } 61 56 62 57 static void cpu_enable_irq(unsigned int irq) 63 58 { 64 59 unsigned long eirr_bit = EIEM_MASK(irq); 65 60 66 - mtctl(eirr_bit, 23); /* clear EIRR bit before unmasking */ 67 61 cpu_eiem |= eirr_bit; 68 - on_each_cpu(cpu_set_eiem, (void *) cpu_eiem, 1, 1); 62 + 63 + /* FIXME: while our interrupts aren't nested, we cannot reset 64 + * the eiem mask if we're already in an interrupt. Once we 65 + * implement nested interrupts, this can go away 66 + */ 67 + if (!in_interrupt()) 68 + set_eiem(cpu_eiem); 69 + 70 + /* This is just a simple NOP IPI. But what it does is cause 71 + * all the other CPUs to do a set_eiem(cpu_eiem) at the end 72 + * of the interrupt handler */ 73 + smp_send_all_nop(); 69 74 } 70 75 71 76 static unsigned int cpu_startup_irq(unsigned int irq) ··· 85 74 void no_ack_irq(unsigned int irq) { } 86 75 void no_end_irq(unsigned int irq) { } 87 76 77 + #ifdef CONFIG_SMP 78 + int cpu_check_affinity(unsigned int irq, cpumask_t *dest) 79 + { 80 + int cpu_dest; 81 + 82 + /* timer and ipi have to always be received on all CPUs */ 83 + if (irq == TIMER_IRQ || irq == IPI_IRQ) { 84 + /* Bad linux design decision. The mask has already 85 + * been set; we must reset it */ 86 + irq_affinity[irq] = CPU_MASK_ALL; 87 + return -EINVAL; 88 + } 89 + 90 + /* whatever mask they set, we just allow one CPU */ 91 + cpu_dest = first_cpu(*dest); 92 + *dest = cpumask_of_cpu(cpu_dest); 93 + 94 + return 0; 95 + } 96 + 97 + static void cpu_set_affinity_irq(unsigned int irq, cpumask_t dest) 98 + { 99 + if (cpu_check_affinity(irq, &dest)) 100 + return; 101 + 102 + irq_affinity[irq] = dest; 103 + } 104 + #endif 105 + 88 106 static struct hw_interrupt_type cpu_interrupt_type = { 89 107 .typename = "CPU", 90 108 .startup = cpu_startup_irq, ··· 122 82 .disable = cpu_disable_irq, 123 83 .ack = no_ack_irq, 124 84 .end = no_end_irq, 125 - // .set_affinity = cpu_set_affinity_irq, 85 + #ifdef CONFIG_SMP 86 + .set_affinity = cpu_set_affinity_irq, 87 + #endif 126 88 }; 127 89 128 90 int show_interrupts(struct seq_file *p, void *v) ··· 261 219 return -1; 262 220 } 263 221 222 + 223 + unsigned long txn_affinity_addr(unsigned int irq, int cpu) 224 + { 225 + #ifdef CONFIG_SMP 226 + irq_affinity[irq] = cpumask_of_cpu(cpu); 227 + #endif 228 + 229 + return cpu_data[cpu].txn_addr; 230 + } 231 + 232 + 264 233 unsigned long txn_alloc_addr(unsigned int virt_irq) 265 234 { 266 235 static int next_cpu = -1; ··· 286 233 if (next_cpu >= NR_CPUS) 287 234 next_cpu = 0; /* nothing else, assign monarch */ 288 235 289 - return cpu_data[next_cpu].txn_addr; 236 + return txn_affinity_addr(virt_irq, next_cpu); 290 237 } 291 238 292 239 ··· 303 250 irq_enter(); 304 251 305 252 /* 306 - * Only allow interrupt processing to be interrupted by the 307 - * timer tick 253 + * Don't allow TIMER or IPI nested interrupts. 254 + * Allowing any single interrupt to nest can lead to that CPU 255 + * handling interrupts with all enabled interrupts unmasked. 308 256 */ 309 - set_eiem(EIEM_MASK(TIMER_IRQ)); 257 + set_eiem(0UL); 310 258 311 259 /* 1) only process IRQs that are enabled/unmasked (cpu_eiem) 312 260 * 2) We loop here on EIRR contents in order to avoid ··· 321 267 if (!eirr_val) 322 268 break; 323 269 324 - if (eirr_val & EIEM_MASK(TIMER_IRQ)) 325 - set_eiem(0); 326 - 327 270 mtctl(eirr_val, 23); /* reset bits we are going to process */ 328 271 329 272 /* Work our way from MSb to LSb...same order we alloc EIRs */ 330 273 for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) { 274 + #ifdef CONFIG_SMP 275 + cpumask_t dest = irq_affinity[irq]; 276 + #endif 331 277 if (!(bit & eirr_val)) 332 278 continue; 333 279 334 280 /* clear bit in mask - can exit loop sooner */ 335 281 eirr_val &= ~bit; 336 282 283 + #ifdef CONFIG_SMP 284 + /* FIXME: because generic set affinity mucks 285 + * with the affinity before sending it to us 286 + * we can get the situation where the affinity is 287 + * wrong for our CPU type interrupts */ 288 + if (irq != TIMER_IRQ && irq != IPI_IRQ && 289 + !cpu_isset(smp_processor_id(), dest)) { 290 + int cpu = first_cpu(dest); 291 + 292 + printk(KERN_DEBUG "redirecting irq %d from CPU %d to %d\n", 293 + irq, smp_processor_id(), cpu); 294 + gsc_writel(irq + CPU_IRQ_BASE, 295 + cpu_data[cpu].hpa); 296 + continue; 297 + } 298 + #endif 299 + 337 300 __do_IRQ(irq, regs); 338 301 } 339 302 } 340 - set_eiem(cpu_eiem); 303 + 304 + set_eiem(cpu_eiem); /* restore original mask */ 341 305 irq_exit(); 342 306 } 343 307 ··· 363 291 static struct irqaction timer_action = { 364 292 .handler = timer_interrupt, 365 293 .name = "timer", 294 + .flags = SA_INTERRUPT, 366 295 }; 367 296 368 297 #ifdef CONFIG_SMP 369 298 static struct irqaction ipi_action = { 370 299 .handler = ipi_interrupt, 371 300 .name = "IPI", 301 + .flags = SA_INTERRUPT, 372 302 }; 373 303 #endif 374 304
+20 -13
arch/parisc/kernel/perf.c
··· 196 196 static ssize_t perf_read(struct file *file, char __user *buf, size_t cnt, loff_t *ppos); 197 197 static ssize_t perf_write(struct file *file, const char __user *buf, size_t count, 198 198 loff_t *ppos); 199 - static int perf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 200 - unsigned long arg); 199 + static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 201 200 static void perf_start_counters(void); 202 201 static int perf_stop_counters(uint32_t *raddr); 203 202 static struct rdr_tbl_ent * perf_rdr_get_entry(uint32_t rdr_num); ··· 437 438 * must be running on the processor that you wish to change. 438 439 */ 439 440 440 - static int perf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 441 - unsigned long arg) 441 + static long perf_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 442 442 { 443 443 long error_start; 444 - uint32_t raddr[4]; 444 + uint32_t raddr[4]; 445 + int error = 0; 445 446 447 + lock_kernel(); 446 448 switch (cmd) { 447 449 448 450 case PA_PERF_ON: 449 451 /* Start the counters */ 450 452 perf_start_counters(); 451 - return 0; 453 + break; 452 454 453 455 case PA_PERF_OFF: 454 456 error_start = perf_stop_counters(raddr); 455 457 if (error_start != 0) { 456 458 printk(KERN_ERR "perf_off: perf_stop_counters = %ld\n", error_start); 457 - return -EFAULT; 459 + error = -EFAULT; 460 + break; 458 461 } 459 462 460 463 /* copy out the Counters */ 461 464 if (copy_to_user((void __user *)arg, raddr, 462 465 sizeof (raddr)) != 0) { 463 - return -EFAULT; 466 + error = -EFAULT; 467 + break; 464 468 } 465 - return 0; 469 + break; 466 470 467 471 case PA_PERF_VERSION: 468 472 /* Return the version # */ 469 - return put_user(PERF_VERSION, (int *)arg); 473 + error = put_user(PERF_VERSION, (int *)arg); 474 + break; 470 475 471 476 default: 472 - break; 477 + error = -ENOTTY; 473 478 } 474 - return -ENOTTY; 479 + 480 + unlock_kernel(); 481 + 482 + return error; 475 483 } 476 484 477 485 static struct file_operations perf_fops = { 478 486 .llseek = no_llseek, 479 487 .read = perf_read, 480 488 .write = perf_write, 481 - .ioctl = perf_ioctl, 489 + .unlocked_ioctl = perf_ioctl, 490 + .compat_ioctl = perf_ioctl, 482 491 .open = perf_open, 483 492 .release = perf_release 484 493 };
+3 -2
arch/parisc/kernel/ptrace.c
··· 264 264 * sigkill. perhaps it should be put in the status 265 265 * that it wants to exit. 266 266 */ 267 + ret = 0; 267 268 DBG("sys_ptrace(KILL)\n"); 268 269 if (child->exit_state == EXIT_ZOMBIE) /* already dead */ 269 270 goto out_tsk; ··· 345 344 346 345 case PTRACE_GETEVENTMSG: 347 346 ret = put_user(child->ptrace_message, (unsigned int __user *) data); 348 - goto out; 347 + goto out_tsk; 349 348 350 349 default: 351 350 ret = ptrace_request(child, request, addr, data); 352 - goto out; 351 + goto out_tsk; 353 352 } 354 353 355 354 out_wake_notrap:
-1
arch/parisc/kernel/signal.c
··· 296 296 struct rt_sigframe __user *frame; 297 297 unsigned long rp, usp; 298 298 unsigned long haddr, sigframe_size; 299 - struct siginfo si; 300 299 int err = 0; 301 300 #ifdef __LP64__ 302 301 compat_int_t compat_val;
+18 -6
arch/parisc/kernel/smp.c
··· 181 181 while (ops) { 182 182 unsigned long which = ffz(~ops); 183 183 184 + ops &= ~(1 << which); 185 + 184 186 switch (which) { 187 + case IPI_NOP: 188 + #if (kDEBUG>=100) 189 + printk(KERN_DEBUG "CPU%d IPI_NOP\n",this_cpu); 190 + #endif /* kDEBUG */ 191 + break; 192 + 185 193 case IPI_RESCHEDULE: 186 194 #if (kDEBUG>=100) 187 195 printk(KERN_DEBUG "CPU%d IPI_RESCHEDULE\n",this_cpu); 188 196 #endif /* kDEBUG */ 189 - ops &= ~(1 << IPI_RESCHEDULE); 190 197 /* 191 198 * Reschedule callback. Everything to be 192 199 * done is done by the interrupt return path. ··· 204 197 #if (kDEBUG>=100) 205 198 printk(KERN_DEBUG "CPU%d IPI_CALL_FUNC\n",this_cpu); 206 199 #endif /* kDEBUG */ 207 - ops &= ~(1 << IPI_CALL_FUNC); 208 200 { 209 201 volatile struct smp_call_struct *data; 210 202 void (*func)(void *info); ··· 237 231 #if (kDEBUG>=100) 238 232 printk(KERN_DEBUG "CPU%d IPI_CPU_START\n",this_cpu); 239 233 #endif /* kDEBUG */ 240 - ops &= ~(1 << IPI_CPU_START); 241 234 #ifdef ENTRY_SYS_CPUS 242 235 p->state = STATE_RUNNING; 243 236 #endif ··· 246 241 #if (kDEBUG>=100) 247 242 printk(KERN_DEBUG "CPU%d IPI_CPU_STOP\n",this_cpu); 248 243 #endif /* kDEBUG */ 249 - ops &= ~(1 << IPI_CPU_STOP); 250 244 #ifdef ENTRY_SYS_CPUS 251 245 #else 252 246 halt_processor(); ··· 256 252 #if (kDEBUG>=100) 257 253 printk(KERN_DEBUG "CPU%d is alive!\n",this_cpu); 258 254 #endif /* kDEBUG */ 259 - ops &= ~(1 << IPI_CPU_TEST); 260 255 break; 261 256 262 257 default: 263 258 printk(KERN_CRIT "Unknown IPI num on CPU%d: %lu\n", 264 259 this_cpu, which); 265 - ops &= ~(1 << which); 266 260 return IRQ_NONE; 267 261 } /* Switch */ 268 262 } /* while (ops) */ ··· 314 312 void 315 313 smp_send_reschedule(int cpu) { send_IPI_single(cpu, IPI_RESCHEDULE); } 316 314 315 + void 316 + smp_send_all_nop(void) 317 + { 318 + send_IPI_allbutself(IPI_NOP); 319 + } 320 + 317 321 318 322 /** 319 323 * Run a function on all other CPUs. ··· 346 338 347 339 /* Can deadlock when called with interrupts disabled */ 348 340 WARN_ON(irqs_disabled()); 341 + 342 + /* can also deadlock if IPIs are disabled */ 343 + WARN_ON((get_eiem() & (1UL<<(CPU_IRQ_MAX - IPI_IRQ))) == 0); 344 + 349 345 350 346 data.func = func; 351 347 data.info = info;
+2 -1
arch/parisc/kernel/syscall.S
··· 164 164 #endif 165 165 STREG %r2, TASK_PT_GR30(%r1) /* ... and save it */ 166 166 167 - STREG %r20, TASK_PT_GR20(%r1) 167 + STREG %r20, TASK_PT_GR20(%r1) /* Syscall number */ 168 168 STREG %r21, TASK_PT_GR21(%r1) 169 169 STREG %r22, TASK_PT_GR22(%r1) 170 170 STREG %r23, TASK_PT_GR23(%r1) /* 4th argument */ ··· 527 527 We *must* giveup this call and fail. 528 528 */ 529 529 ldw 4(%sr2,%r20), %r28 /* Load thread register */ 530 + /* WARNING: If cr27 cycles to the same value we have problems */ 530 531 mfctl %cr27, %r21 /* Get current thread register */ 531 532 cmpb,<>,n %r21, %r28, cas_lock /* Called recursive? */ 532 533 b lws_exit /* Return error! */
+1 -1
drivers/ide/Kconfig
··· 625 625 tristate "NS87415 chipset support" 626 626 help 627 627 This driver adds detection and support for the NS87415 chip 628 - (used in SPARC64, among others). 628 + (used mainly on SPARC64 and PA-RISC machines). 629 629 630 630 Please read the comments at the top of <file:drivers/ide/pci/ns87415.c>. 631 631
+6 -6
drivers/isdn/hisax/Kconfig
··· 110 110 111 111 config HISAX_TELESPCI 112 112 bool "Teles PCI" 113 - depends on PCI && (BROKEN || !(SPARC64 || PPC)) 113 + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) 114 114 help 115 115 This enables HiSax support for the Teles PCI. 116 116 See <file:Documentation/isdn/README.HiSax> on how to configure it. ··· 238 238 239 239 config HISAX_NETJET 240 240 bool "NETjet card" 241 - depends on PCI && (BROKEN || !(SPARC64 || PPC)) 241 + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) 242 242 help 243 243 This enables HiSax support for the NetJet from Traverse 244 244 Technologies. ··· 249 249 250 250 config HISAX_NETJET_U 251 251 bool "NETspider U card" 252 - depends on PCI && (BROKEN || !(SPARC64 || PPC)) 252 + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) 253 253 help 254 254 This enables HiSax support for the Netspider U interface ISDN card 255 255 from Traverse Technologies. ··· 317 317 318 318 config HISAX_HFC_PCI 319 319 bool "HFC PCI-Bus cards" 320 - depends on PCI && (BROKEN || !(SPARC64 || PPC)) 320 + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) 321 321 help 322 322 This enables HiSax support for the HFC-S PCI 2BDS0 based cards. 323 323 ··· 344 344 345 345 config HISAX_ENTERNOW_PCI 346 346 bool "Formula-n enter:now PCI card" 347 - depends on PCI && (BROKEN || !(SPARC64 || PPC)) 347 + depends on PCI && (BROKEN || !(SPARC || PPC || PARISC || M68K)) 348 348 help 349 349 This enables HiSax support for the Formula-n enter:now PCI 350 350 ISDN card. 351 351 352 352 config HISAX_AMD7930 353 353 bool "Am7930 (EXPERIMENTAL)" 354 - depends on EXPERIMENTAL && (SPARC32 || SPARC64) 354 + depends on EXPERIMENTAL && SPARC 355 355 help 356 356 This enables HiSax support for the AMD7930 chips on some SPARCs. 357 357 This code is not finished yet.
+1 -1
drivers/isdn/pcbit/Kconfig
··· 3 3 # 4 4 config ISDN_DRV_PCBIT 5 5 tristate "PCBIT-D support" 6 - depends on ISDN_I4L && ISA && (BROKEN || !PPC) 6 + depends on ISDN_I4L && ISA && (BROKEN || X86) 7 7 help 8 8 This enables support for the PCBIT ISDN-card. This card is 9 9 manufactured in Portugal by Octal. For running this card,
+25 -1
drivers/parisc/iosapic.c
··· 700 700 return 0; 701 701 } 702 702 703 + #ifdef CONFIG_SMP 704 + static void iosapic_set_affinity_irq(unsigned int irq, cpumask_t dest) 705 + { 706 + struct vector_info *vi = iosapic_get_vector(irq); 707 + u32 d0, d1, dummy_d0; 708 + unsigned long flags; 709 + 710 + if (cpu_check_affinity(irq, &dest)) 711 + return; 712 + 713 + vi->txn_addr = txn_affinity_addr(irq, first_cpu(dest)); 714 + 715 + spin_lock_irqsave(&iosapic_lock, flags); 716 + /* d1 contains the destination CPU, so only want to set that 717 + * entry */ 718 + iosapic_rd_irt_entry(vi, &d0, &d1); 719 + iosapic_set_irt_data(vi, &dummy_d0, &d1); 720 + iosapic_wr_irt_entry(vi, d0, d1); 721 + spin_unlock_irqrestore(&iosapic_lock, flags); 722 + } 723 + #endif 724 + 703 725 static struct hw_interrupt_type iosapic_interrupt_type = { 704 726 .typename = "IO-SAPIC-level", 705 727 .startup = iosapic_startup_irq, ··· 730 708 .disable = iosapic_disable_irq, 731 709 .ack = no_ack_irq, 732 710 .end = iosapic_end_irq, 733 - // .set_affinity = iosapic_set_affinity_irq, 711 + #ifdef CONFIG_SMP 712 + .set_affinity = iosapic_set_affinity_irq, 713 + #endif 734 714 }; 735 715 736 716 int iosapic_fixup_irq(void *isi_obj, struct pci_dev *pcidev)
+21 -14
drivers/parisc/superio.c
··· 24 24 * Major changes to get basic interrupt infrastructure working to 25 25 * hopefully be able to support all SuperIO devices. Currently 26 26 * works with serial. -- John Marvin <jsm@fc.hp.com> 27 + * 28 + * Converted superio_init() to be a PCI_FIXUP_FINAL callee. 29 + * -- Kyle McMartin <kyle@parisc-linux.org> 27 30 */ 28 31 29 32 ··· 144 141 } 145 142 146 143 /* Initialize Super I/O device */ 147 - 148 - static void __devinit 149 - superio_init(struct superio_device *sio) 144 + static void 145 + superio_init(struct pci_dev *pcidev) 150 146 { 147 + struct superio_device *sio = &sio_dev; 151 148 struct pci_dev *pdev = sio->lio_pdev; 152 149 u16 word; 153 150 ··· 163 160 /* ...then properly fixup the USB to point at suckyio PIC */ 164 161 sio->usb_pdev->irq = superio_fixup_irq(sio->usb_pdev); 165 162 166 - printk (KERN_INFO "SuperIO: Found NS87560 Legacy I/O device at %s (IRQ %i) \n", 167 - pci_name(pdev),pdev->irq); 163 + printk(KERN_INFO "SuperIO: Found NS87560 Legacy I/O device at %s (IRQ %i) \n", 164 + pci_name(pdev), pdev->irq); 168 165 169 166 pci_read_config_dword (pdev, SIO_SP1BAR, &sio->sp1_base); 170 167 sio->sp1_base &= ~1; ··· 277 274 278 275 sio->suckyio_irq_enabled = 1; 279 276 } 280 - 277 + DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO, superio_init); 281 278 282 279 static void superio_disable_irq(unsigned int irq) 283 280 { ··· 455 452 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415, superio_fixup_pci); 456 453 457 454 458 - static int __devinit superio_probe(struct pci_dev *dev, const struct pci_device_id *id) 455 + static int __devinit 456 + superio_probe(struct pci_dev *dev, const struct pci_device_id *id) 459 457 { 458 + struct superio_device *sio = &sio_dev; 460 459 461 460 /* 462 461 ** superio_probe(00:0e.0) ven 0x100b dev 0x2 sv 0x0 sd 0x0 class 0x1018a ··· 471 466 dev->subsystem_vendor, dev->subsystem_device, 472 467 dev->class); 473 468 474 - superio_init(&sio_dev); 469 + if (!sio->suckyio_irq_enabled) 470 + BUG(); /* Enabled by PCI_FIXUP_FINAL */ 475 471 476 472 if (dev->device == PCI_DEVICE_ID_NS_87560_LIO) { /* Function 1 */ 477 473 superio_parport_init(); ··· 487 481 DBG_INIT("superio_probe: WTF? Fire Extinguisher?\n"); 488 482 } 489 483 490 - /* Let appropriate other driver claim this device. */ 484 + /* Let appropriate other driver claim this device. */ 491 485 return -ENODEV; 492 486 } 493 487 494 488 static struct pci_device_id superio_tbl[] = { 495 - { PCI_VENDOR_ID_NS, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, 489 + { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO) }, 490 + { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_USB) }, 491 + { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87415) }, 496 492 { 0, } 497 493 }; 498 494 499 495 static struct pci_driver superio_driver = { 500 - .name = "SuperIO", 501 - .id_table = superio_tbl, 502 - .probe = superio_probe, 496 + .name = "SuperIO", 497 + .id_table = superio_tbl, 498 + .probe = superio_probe, 503 499 }; 504 500 505 501 static int __init superio_modinit(void) ··· 513 505 { 514 506 pci_unregister_driver(&superio_driver); 515 507 } 516 - 517 508 518 509 module_init(superio_modinit); 519 510 module_exit(superio_exit);
+1 -1
drivers/serial/Kconfig
··· 507 507 508 508 config SERIAL_MUX 509 509 tristate "Serial MUX support" 510 - depends on PARISC 510 + depends on GSC 511 511 select SERIAL_CORE 512 512 default y 513 513 ---help---
+11 -8
drivers/serial/mux.c
··· 65 65 66 66 static struct timer_list mux_timer; 67 67 68 - #define UART_PUT_CHAR(p, c) __raw_writel((c), (unsigned long)(p)->membase + IO_DATA_REG_OFFSET) 69 - #define UART_GET_FIFO_CNT(p) __raw_readl((unsigned long)(p)->membase + IO_DCOUNT_REG_OFFSET) 68 + #define UART_PUT_CHAR(p, c) __raw_writel((c), (p)->membase + IO_DATA_REG_OFFSET) 69 + #define UART_GET_FIFO_CNT(p) __raw_readl((p)->membase + IO_DCOUNT_REG_OFFSET) 70 70 #define GET_MUX_PORTS(iodc_data) ((((iodc_data)[4] & 0xf0) >> 4) * 8) + 8 71 71 72 72 /** ··· 79 79 */ 80 80 static unsigned int mux_tx_empty(struct uart_port *port) 81 81 { 82 - unsigned int cnt = __raw_readl((unsigned long)port->membase 83 - + IO_DCOUNT_REG_OFFSET); 84 - 85 - return cnt ? 0 : TIOCSER_TEMT; 82 + return UART_GET_FIFO_CNT(port) ? 0 : TIOCSER_TEMT; 86 83 } 87 84 88 85 /** ··· 215 218 __u32 start_count = port->icount.rx; 216 219 217 220 while(1) { 218 - data = __raw_readl((unsigned long)port->membase 219 - + IO_DATA_REG_OFFSET); 221 + data = __raw_readl(port->membase + IO_DATA_REG_OFFSET); 220 222 221 223 if (MUX_STATUS(data)) 222 224 continue; ··· 477 481 port->ops = &mux_pops; 478 482 port->flags = UPF_BOOT_AUTOCONF; 479 483 port->line = port_cnt; 484 + 485 + /* The port->timeout needs to match what is present in 486 + * uart_wait_until_sent in serial_core.c. Otherwise 487 + * the time spent in msleep_interruptable will be very 488 + * long, causing the appearance of a console hang. 489 + */ 490 + port->timeout = HZ / 50; 480 491 spin_lock_init(&port->lock); 481 492 status = uart_add_one_port(&mux_driver, port); 482 493 BUG_ON(status);
+3 -2
include/asm-parisc/irq.h
··· 8 8 #define _ASM_PARISC_IRQ_H 9 9 10 10 #include <linux/config.h> 11 + #include <linux/cpumask.h> 11 12 #include <asm/types.h> 12 13 13 14 #define NO_IRQ (-1) ··· 50 49 extern int txn_claim_irq(int); 51 50 extern unsigned int txn_alloc_data(unsigned int); 52 51 extern unsigned long txn_alloc_addr(unsigned int); 52 + extern unsigned long txn_affinity_addr(unsigned int irq, int cpu); 53 53 54 54 extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *); 55 - 56 - extern int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *, void *); 55 + extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest); 57 56 58 57 /* soft power switch support (power.c) */ 59 58 extern struct tasklet_struct power_tasklet;
+6 -1
include/asm-parisc/smp.h
··· 29 29 #define cpu_logical_map(cpu) (cpu) 30 30 31 31 extern void smp_send_reschedule(int cpu); 32 + extern void smp_send_all_nop(void); 32 33 33 34 #endif /* !ASSEMBLY */ 34 35 ··· 54 53 55 54 #define raw_smp_processor_id() (current_thread_info()->cpu) 56 55 57 - #endif /* CONFIG_SMP */ 56 + #else /* CONFIG_SMP */ 57 + 58 + static inline void smp_send_all_nop(void) { return; } 59 + 60 + #endif 58 61 59 62 #define NO_PROC_ID 0xFF /* No processor magic marker */ 60 63 #define ANY_PROC_ID 0xFF /* Any processor magic marker */
+10 -9
include/asm-parisc/spinlock.h
··· 11 11 return *a == 0; 12 12 } 13 13 14 - #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) 14 + #define __raw_spin_lock(lock) __raw_spin_lock_flags(lock, 0) 15 15 #define __raw_spin_unlock_wait(x) \ 16 16 do { cpu_relax(); } while (__raw_spin_is_locked(x)) 17 17 18 - static inline void __raw_spin_lock(raw_spinlock_t *x) 18 + static inline void __raw_spin_lock_flags(raw_spinlock_t *x, 19 + unsigned long flags) 19 20 { 20 21 volatile unsigned int *a; 21 22 22 23 mb(); 23 24 a = __ldcw_align(x); 24 25 while (__ldcw(a) == 0) 25 - while (*a == 0); 26 + while (*a == 0) 27 + if (flags & PSW_SM_I) { 28 + local_irq_enable(); 29 + cpu_relax(); 30 + local_irq_disable(); 31 + } else 32 + cpu_relax(); 26 33 mb(); 27 34 } 28 35 ··· 67 60 68 61 static __inline__ void __raw_read_lock(raw_rwlock_t *rw) 69 62 { 70 - unsigned long flags; 71 - local_irq_save(flags); 72 63 __raw_spin_lock(&rw->lock); 73 64 74 65 rw->counter++; 75 66 76 67 __raw_spin_unlock(&rw->lock); 77 - local_irq_restore(flags); 78 68 } 79 69 80 70 static __inline__ void __raw_read_unlock(raw_rwlock_t *rw) 81 71 { 82 - unsigned long flags; 83 - local_irq_save(flags); 84 72 __raw_spin_lock(&rw->lock); 85 73 86 74 rw->counter--; 87 75 88 76 __raw_spin_unlock(&rw->lock); 89 - local_irq_restore(flags); 90 77 } 91 78 92 79 /* write_lock is less trivial. We optimistically grab the lock and check
+4 -12
include/asm-parisc/tlbflush.h
··· 12 12 * N class systems, only one PxTLB inter processor broadcast can be 13 13 * active at any one time on the Merced bus. This tlb purge 14 14 * synchronisation is fairly lightweight and harmless so we activate 15 - * it on all SMP systems not just the N class. */ 16 - #ifdef CONFIG_SMP 15 + * it on all SMP systems not just the N class. We also need to have 16 + * preemption disabled on uniprocessor machines, and spin_lock does that 17 + * nicely. 18 + */ 17 19 extern spinlock_t pa_tlb_lock; 18 20 19 21 #define purge_tlb_start(x) spin_lock(&pa_tlb_lock) 20 22 #define purge_tlb_end(x) spin_unlock(&pa_tlb_lock) 21 - 22 - #else 23 - 24 - #define purge_tlb_start(x) do { } while(0) 25 - #define purge_tlb_end(x) do { } while (0) 26 - 27 - #endif 28 - 29 23 30 24 extern void flush_tlb_all(void); 31 25 ··· 82 88 if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ 83 89 flush_tlb_all(); 84 90 else { 85 - preempt_disable(); 86 91 mtsp(vma->vm_mm->context,1); 87 92 purge_tlb_start(); 88 93 if (split_tlb) { ··· 95 102 pdtlb(start); 96 103 start += PAGE_SIZE; 97 104 } 98 - preempt_enable(); 99 105 } 100 106 purge_tlb_end(); 101 107 }
+2
include/linux/mm.h
··· 940 940 941 941 /* Do stack extension */ 942 942 extern int expand_stack(struct vm_area_struct *vma, unsigned long address); 943 + #ifdef CONFIG_IA64 943 944 extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); 945 + #endif 944 946 945 947 /* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ 946 948 extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
+1 -1
mm/mmap.c
··· 1501 1501 * PA-RISC uses this for its stack; IA64 for its Register Backing Store. 1502 1502 * vma is the last one with address > vma->vm_end. Have to extend vma. 1503 1503 */ 1504 - #ifdef CONFIG_STACK_GROWSUP 1504 + #ifndef CONFIG_IA64 1505 1505 static inline 1506 1506 #endif 1507 1507 int expand_upwards(struct vm_area_struct *vma, unsigned long address)