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 'parisc-for-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc architecture fixes from Helge Deller:
"This mostly handles oddities with the serial port 8250_gsc.c driver.

Although the name suggests it's just for serial ports on the GSC bus
(e.g. in older PA-RISC machines), it handles serial ports on PA-RISC
PCI devices (e.g. on the SuperIO chip) as well.

Thus this renames the driver to 8250_parisc and fixes the config
dependencies.

The other change is a cleanup on how the device IDs of devices in a
PA-RISC machine are shown at startup"

* tag 'parisc-for-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Avoid printing the hardware path twice
parisc: Export iosapic_serial_irq() symbol for serial port driver
MAINTAINERS: adjust entry after renaming parisc serial driver
parisc: Use signed char for hardware path in pdc.h
parisc/serial: Rename 8250_gsc.c to 8250_parisc.c
parisc: Make 8250_gsc driver dependend on CONFIG_PARISC

+47 -58
+1 -1
MAINTAINERS
··· 15630 15630 F: drivers/input/serio/hp_sdc* 15631 15631 F: drivers/parisc/ 15632 15632 F: drivers/parport/parport_gsc.* 15633 - F: drivers/tty/serial/8250/8250_gsc.c 15633 + F: drivers/tty/serial/8250/8250_parisc.c 15634 15634 F: drivers/video/console/sti* 15635 15635 F: drivers/video/fbdev/sti* 15636 15636 F: drivers/video/logo/logo_parisc*
+6 -6
arch/parisc/include/asm/hardware.h
··· 10 10 #define SVERSION_ANY_ID PA_SVERSION_ANY_ID 11 11 12 12 struct hp_hardware { 13 - unsigned short hw_type:5; /* HPHW_xxx */ 14 - unsigned short hversion; 15 - unsigned long sversion:28; 16 - unsigned short opt; 17 - const char name[80]; /* The hardware description */ 18 - }; 13 + unsigned int hw_type:8; /* HPHW_xxx */ 14 + unsigned int hversion:12; 15 + unsigned int sversion:12; 16 + unsigned char opt; 17 + unsigned char name[59]; /* The hardware description */ 18 + } __packed; 19 19 20 20 struct parisc_device; 21 21
+13 -23
arch/parisc/include/uapi/asm/pdc.h
··· 363 363 364 364 #if !defined(__ASSEMBLY__) 365 365 366 - /* flags of the device_path */ 366 + /* flags for hardware_path */ 367 367 #define PF_AUTOBOOT 0x80 368 368 #define PF_AUTOSEARCH 0x40 369 369 #define PF_TIMER 0x0F 370 370 371 - struct device_path { /* page 1-69 */ 372 - unsigned char flags; /* flags see above! */ 373 - unsigned char bc[6]; /* bus converter routing info */ 374 - unsigned char mod; 375 - unsigned int layers[6];/* device-specific layer-info */ 376 - } __attribute__((aligned(8))) ; 371 + struct hardware_path { 372 + unsigned char flags; /* see bit definitions below */ 373 + signed char bc[6]; /* Bus Converter routing info to a specific */ 374 + /* I/O adaptor (< 0 means none, > 63 resvd) */ 375 + signed char mod; /* fixed field of specified module */ 376 + }; 377 + 378 + struct pdc_module_path { /* page 1-69 */ 379 + struct hardware_path path; 380 + unsigned int layers[6]; /* device-specific info (ctlr #, unit # ...) */ 381 + } __attribute__((aligned(8))); 377 382 378 383 struct pz_device { 379 - struct device_path dp; /* see above */ 384 + struct pdc_module_path dp; /* see above */ 380 385 /* struct iomod *hpa; */ 381 386 unsigned int hpa; /* HPA base address */ 382 387 /* char *spa; */ ··· 614 609 int factor; 615 610 int width; 616 611 int mode; 617 - }; 618 - 619 - struct hardware_path { 620 - char flags; /* see bit definitions below */ 621 - char bc[6]; /* Bus Converter routing info to a specific */ 622 - /* I/O adaptor (< 0 means none, > 63 resvd) */ 623 - char mod; /* fixed field of specified module */ 624 - }; 625 - 626 - /* 627 - * Device path specifications used by PDC. 628 - */ 629 - struct pdc_module_path { 630 - struct hardware_path path; 631 - unsigned int layers[6]; /* device-specific info (ctlr #, unit # ...) */ 632 612 }; 633 613 634 614 /* Only used on some pre-PA2.0 boxes */
+6 -8
arch/parisc/kernel/drivers.c
··· 882 882 &root); 883 883 } 884 884 885 - static void print_parisc_device(struct parisc_device *dev) 885 + static __init void print_parisc_device(struct parisc_device *dev) 886 886 { 887 - char hw_path[64]; 888 - static int count; 887 + static int count __initdata; 889 888 890 - print_pa_hwpath(dev, hw_path); 891 - pr_info("%d. %s at %pap [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", 892 - ++count, dev->name, &(dev->hpa.start), hw_path, dev->id.hw_type, 893 - dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); 889 + pr_info("%d. %s at %pap { type:%d, hv:%#x, sv:%#x, rev:%#x }", 890 + ++count, dev->name, &(dev->hpa.start), dev->id.hw_type, 891 + dev->id.hversion, dev->id.sversion, dev->id.hversion_rev); 894 892 895 893 if (dev->num_addrs) { 896 894 int k; ··· 1077 1079 1078 1080 1079 1081 1080 - static int print_one_device(struct device * dev, void * data) 1082 + static __init int print_one_device(struct device * dev, void * data) 1081 1083 { 1082 1084 struct parisc_device * pdev = to_parisc_device(dev); 1083 1085
+1
drivers/parisc/iosapic.c
··· 866 866 867 867 return vi->txn_irq; 868 868 } 869 + EXPORT_SYMBOL(iosapic_serial_irq); 869 870 #endif 870 871 871 872
+17 -17
drivers/parisc/pdc_stable.c
··· 14 14 * all) PA-RISC machines should have them. Anyway, for safety reasons, the 15 15 * following code can deal with just 96 bytes of Stable Storage, and all 16 16 * sizes between 96 and 192 bytes (provided they are multiple of struct 17 - * device_path size, eg: 128, 160 and 192) to provide full information. 17 + * pdc_module_path size, eg: 128, 160 and 192) to provide full information. 18 18 * One last word: there's one path we can always count on: the primary path. 19 19 * Anything above 224 bytes is used for 'osdep2' OS-dependent storage area. 20 20 * ··· 88 88 short ready; /* entry record is valid if != 0 */ 89 89 unsigned long addr; /* entry address in stable storage */ 90 90 char *name; /* entry name */ 91 - struct device_path devpath; /* device path in parisc representation */ 91 + struct pdc_module_path devpath; /* device path in parisc representation */ 92 92 struct device *dev; /* corresponding device */ 93 93 struct kobject kobj; 94 94 }; ··· 138 138 static int 139 139 pdcspath_fetch(struct pdcspath_entry *entry) 140 140 { 141 - struct device_path *devpath; 141 + struct pdc_module_path *devpath; 142 142 143 143 if (!entry) 144 144 return -EINVAL; ··· 153 153 return -EIO; 154 154 155 155 /* Find the matching device. 156 - NOTE: hardware_path overlays with device_path, so the nice cast can 156 + NOTE: hardware_path overlays with pdc_module_path, so the nice cast can 157 157 be used */ 158 158 entry->dev = hwpath_to_device((struct hardware_path *)devpath); 159 159 ··· 179 179 static void 180 180 pdcspath_store(struct pdcspath_entry *entry) 181 181 { 182 - struct device_path *devpath; 182 + struct pdc_module_path *devpath; 183 183 184 184 BUG_ON(!entry); 185 185 ··· 221 221 pdcspath_hwpath_read(struct pdcspath_entry *entry, char *buf) 222 222 { 223 223 char *out = buf; 224 - struct device_path *devpath; 224 + struct pdc_module_path *devpath; 225 225 short i; 226 226 227 227 if (!entry || !buf) ··· 236 236 return -ENODATA; 237 237 238 238 for (i = 0; i < 6; i++) { 239 - if (devpath->bc[i] >= 128) 239 + if (devpath->path.bc[i] < 0) 240 240 continue; 241 - out += sprintf(out, "%u/", (unsigned char)devpath->bc[i]); 241 + out += sprintf(out, "%d/", devpath->path.bc[i]); 242 242 } 243 - out += sprintf(out, "%u\n", (unsigned char)devpath->mod); 243 + out += sprintf(out, "%u\n", (unsigned char)devpath->path.mod); 244 244 245 245 return out - buf; 246 246 } ··· 296 296 for (i=5; ((temp = strrchr(in, '/'))) && (temp-in > 0) && (likely(i)); i--) { 297 297 hwpath.bc[i] = simple_strtoul(temp+1, NULL, 10); 298 298 in[temp-in] = '\0'; 299 - DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.bc[i]); 299 + DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.path.bc[i]); 300 300 } 301 301 302 302 /* Store the final field */ 303 303 hwpath.bc[i] = simple_strtoul(in, NULL, 10); 304 - DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.bc[i]); 304 + DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.path.bc[i]); 305 305 306 306 /* Now we check that the user isn't trying to lure us */ 307 307 if (!(dev = hwpath_to_device((struct hardware_path *)&hwpath))) { ··· 342 342 pdcspath_layer_read(struct pdcspath_entry *entry, char *buf) 343 343 { 344 344 char *out = buf; 345 - struct device_path *devpath; 345 + struct pdc_module_path *devpath; 346 346 short i; 347 347 348 348 if (!entry || !buf) ··· 547 547 pathentry = &pdcspath_entry_primary; 548 548 549 549 read_lock(&pathentry->rw_lock); 550 - out += sprintf(out, "%s\n", (pathentry->devpath.flags & knob) ? 550 + out += sprintf(out, "%s\n", (pathentry->devpath.path.flags & knob) ? 551 551 "On" : "Off"); 552 552 read_unlock(&pathentry->rw_lock); 553 553 ··· 594 594 595 595 /* print the timer value in seconds */ 596 596 read_lock(&pathentry->rw_lock); 597 - out += sprintf(out, "%u\n", (pathentry->devpath.flags & PF_TIMER) ? 598 - (1 << (pathentry->devpath.flags & PF_TIMER)) : 0); 597 + out += sprintf(out, "%u\n", (pathentry->devpath.path.flags & PF_TIMER) ? 598 + (1 << (pathentry->devpath.path.flags & PF_TIMER)) : 0); 599 599 read_unlock(&pathentry->rw_lock); 600 600 601 601 return out - buf; ··· 764 764 765 765 /* Be nice to the existing flag record */ 766 766 read_lock(&pathentry->rw_lock); 767 - flags = pathentry->devpath.flags; 767 + flags = pathentry->devpath.path.flags; 768 768 read_unlock(&pathentry->rw_lock); 769 769 770 770 DPRINTK("%s: flags before: 0x%X\n", __func__, flags); ··· 785 785 write_lock(&pathentry->rw_lock); 786 786 787 787 /* Change the path entry flags first */ 788 - pathentry->devpath.flags = flags; 788 + pathentry->devpath.path.flags = flags; 789 789 790 790 /* Now, dive in. Write back to the hardware */ 791 791 pdcspath_store(pathentry);
drivers/tty/serial/8250/8250_gsc.c drivers/tty/serial/8250/8250_parisc.c
+2 -2
drivers/tty/serial/8250/Kconfig
··· 116 116 117 117 If unsure, say N. 118 118 119 - config SERIAL_8250_GSC 119 + config SERIAL_8250_PARISC 120 120 tristate 121 - depends on SERIAL_8250 && GSC 121 + depends on SERIAL_8250 && PARISC 122 122 default SERIAL_8250 123 123 124 124 config SERIAL_8250_DMA
+1 -1
drivers/tty/serial/8250/Makefile
··· 12 12 8250_base-$(CONFIG_SERIAL_8250_DMA) += 8250_dma.o 13 13 8250_base-$(CONFIG_SERIAL_8250_DWLIB) += 8250_dwlib.o 14 14 8250_base-$(CONFIG_SERIAL_8250_FINTEK) += 8250_fintek.o 15 - obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o 15 + obj-$(CONFIG_SERIAL_8250_PARISC) += 8250_parisc.o 16 16 obj-$(CONFIG_SERIAL_8250_PCI) += 8250_pci.o 17 17 obj-$(CONFIG_SERIAL_8250_EXAR) += 8250_exar.o 18 18 obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o