Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
math-emu: correct test for downshifting fraction in _FP_FROM_INT()
perf: Add DWARF register lookup for sparc
MAINTAINERS: Add SBUS driver path to sparc entry.
drivers/sbus: Remove unnecessary casts of private_data
sparc: remove homegrown L1_CACHE_ALIGN macro
sparc64: fix the build error due to smp_kgdb_capture_client()
sparc64: Fix maybe_change_configuration() PCR setting.
arch/sparc/kernel: Eliminate what looks like a NULL pointer dereference
sparc64: Update defconfig.
sunsu: Fix use after free in su_remove().
sunserial: Don't call add_preferred_console() when console= is specified.
sparc32: Kill none_mask, it's bogus.

+103 -33
+1
MAINTAINERS
··· 5336 5336 T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git 5337 5337 S: Maintained 5338 5338 F: arch/sparc/ 5339 + F: drivers/sbus 5339 5340 5340 5341 SPARC SERIAL DRIVERS 5341 5342 M: "David S. Miller" <davem@davemloft.net>
+35 -14
arch/sparc/configs/sparc64_defconfig
··· 1 1 # 2 2 # Automatically generated make config: don't edit 3 - # Linux kernel version: 2.6.34-rc3 4 - # Sat Apr 3 15:49:56 2010 3 + # Linux kernel version: 2.6.34 4 + # Wed May 26 21:14:01 2010 5 5 # 6 6 CONFIG_64BIT=y 7 7 CONFIG_SPARC=y ··· 107 107 # CONFIG_DEBUG_PERF_USE_VMALLOC is not set 108 108 CONFIG_VM_EVENT_COUNTERS=y 109 109 CONFIG_PCI_QUIRKS=y 110 - CONFIG_SLUB_DEBUG=y 111 110 # CONFIG_COMPAT_BRK is not set 112 - # CONFIG_SLAB is not set 113 - CONFIG_SLUB=y 111 + CONFIG_SLAB=y 112 + # CONFIG_SLUB is not set 114 113 # CONFIG_SLOB is not set 115 114 CONFIG_PROFILING=y 116 115 CONFIG_TRACEPOINTS=y ··· 238 239 CONFIG_SPARSEMEM_VMEMMAP=y 239 240 CONFIG_PAGEFLAGS_EXTENDED=y 240 241 CONFIG_SPLIT_PTLOCK_CPUS=4 242 + # CONFIG_COMPACTION is not set 241 243 CONFIG_MIGRATION=y 242 244 CONFIG_PHYS_ADDR_T_64BIT=y 243 245 CONFIG_ZONE_DMA_FLAG=0 ··· 351 351 # CONFIG_RDS is not set 352 352 # CONFIG_TIPC is not set 353 353 # CONFIG_ATM is not set 354 + # CONFIG_L2TP is not set 354 355 # CONFIG_BRIDGE is not set 355 356 # CONFIG_NET_DSA is not set 356 357 CONFIG_VLAN_8021Q=m ··· 368 367 # CONFIG_IEEE802154 is not set 369 368 # CONFIG_NET_SCHED is not set 370 369 # CONFIG_DCB is not set 370 + CONFIG_RPS=y 371 371 372 372 # 373 373 # Network testing ··· 388 386 # 389 387 # CFG80211 needs to be enabled for MAC80211 390 388 # 389 + 390 + # 391 + # Some wireless drivers require a rate control algorithm 392 + # 391 393 # CONFIG_WIMAX is not set 392 394 # CONFIG_RFKILL is not set 393 395 # CONFIG_NET_9P is not set 396 + # CONFIG_CAIF is not set 394 397 395 398 # 396 399 # Device Drivers ··· 665 658 # CONFIG_NATIONAL_PHY is not set 666 659 # CONFIG_STE10XP is not set 667 660 # CONFIG_LSI_ET1011C_PHY is not set 661 + # CONFIG_MICREL_PHY is not set 668 662 # CONFIG_MDIO_BITBANG is not set 669 663 CONFIG_NET_ETHERNET=y 670 664 CONFIG_MII=m ··· 742 734 # CONFIG_CHELSIO_T1 is not set 743 735 CONFIG_CHELSIO_T3_DEPENDS=y 744 736 # CONFIG_CHELSIO_T3 is not set 737 + CONFIG_CHELSIO_T4_DEPENDS=y 738 + # CONFIG_CHELSIO_T4 is not set 745 739 # CONFIG_ENIC is not set 746 740 # CONFIG_IXGBE is not set 747 741 # CONFIG_IXGBEVF is not set ··· 776 766 # CONFIG_USB_PEGASUS is not set 777 767 # CONFIG_USB_RTL8150 is not set 778 768 # CONFIG_USB_USBNET is not set 769 + # CONFIG_USB_IPHETH is not set 779 770 # CONFIG_WAN is not set 780 771 # CONFIG_FDDI is not set 781 772 # CONFIG_HIPPI is not set ··· 789 778 CONFIG_PPP_BSDCOMP=m 790 779 CONFIG_PPP_MPPE=m 791 780 CONFIG_PPPOE=m 792 - # CONFIG_PPPOL2TP is not set 793 781 # CONFIG_SLIP is not set 794 782 CONFIG_SLHC=m 795 783 # CONFIG_NET_FC is not set ··· 826 816 CONFIG_KEYBOARD_ATKBD=y 827 817 # CONFIG_QT2160 is not set 828 818 CONFIG_KEYBOARD_LKKBD=m 819 + # CONFIG_KEYBOARD_TCA6416 is not set 829 820 # CONFIG_KEYBOARD_MAX7359 is not set 830 821 # CONFIG_KEYBOARD_NEWTON is not set 831 822 # CONFIG_KEYBOARD_OPENCORES is not set ··· 851 840 # CONFIG_INPUT_TABLET is not set 852 841 # CONFIG_INPUT_TOUCHSCREEN is not set 853 842 CONFIG_INPUT_MISC=y 843 + # CONFIG_INPUT_AD714X is not set 854 844 CONFIG_INPUT_SPARCSPKR=y 855 845 # CONFIG_INPUT_ATI_REMOTE is not set 856 846 # CONFIG_INPUT_ATI_REMOTE2 is not set ··· 860 848 # CONFIG_INPUT_YEALINK is not set 861 849 # CONFIG_INPUT_CM109 is not set 862 850 # CONFIG_INPUT_UINPUT is not set 851 + # CONFIG_INPUT_PCF8574 is not set 863 852 864 853 # 865 854 # Hardware I/O ports ··· 884 871 # CONFIG_VT_HW_CONSOLE_BINDING is not set 885 872 # CONFIG_DEVKMEM is not set 886 873 # CONFIG_SERIAL_NONSTANDARD is not set 874 + # CONFIG_N_GSM is not set 887 875 # CONFIG_NOZOMI is not set 888 876 889 877 # ··· 907 893 # CONFIG_SERIAL_JSM is not set 908 894 # CONFIG_SERIAL_TIMBERDALE is not set 909 895 # CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set 896 + # CONFIG_SERIAL_ALTERA_JTAGUART is not set 897 + # CONFIG_SERIAL_ALTERA_UART is not set 910 898 CONFIG_UNIX98_PTYS=y 911 899 # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 912 900 # CONFIG_LEGACY_PTYS is not set ··· 1322 1306 CONFIG_HID_A4TECH=y 1323 1307 CONFIG_HID_APPLE=y 1324 1308 CONFIG_HID_BELKIN=y 1309 + # CONFIG_HID_CANDO is not set 1325 1310 CONFIG_HID_CHERRY=y 1326 1311 CONFIG_HID_CHICONY=y 1312 + # CONFIG_HID_PRODIKEYS is not set 1327 1313 CONFIG_HID_CYPRESS=y 1328 1314 CONFIG_HID_DRAGONRISE=y 1329 1315 # CONFIG_DRAGONRISE_FF is not set 1316 + # CONFIG_HID_EGALAX is not set 1330 1317 CONFIG_HID_EZKEY=y 1331 1318 CONFIG_HID_KYE=y 1332 1319 CONFIG_HID_GYRATION=y ··· 1347 1328 CONFIG_HID_PANTHERLORD=y 1348 1329 # CONFIG_PANTHERLORD_FF is not set 1349 1330 CONFIG_HID_PETALYNX=y 1331 + # CONFIG_HID_PICOLCD is not set 1350 1332 # CONFIG_HID_QUANTA is not set 1333 + # CONFIG_HID_ROCCAT_KONE is not set 1351 1334 CONFIG_HID_SAMSUNG=y 1352 1335 CONFIG_HID_SONY=y 1353 1336 # CONFIG_HID_STANTUM is not set ··· 1363 1342 # CONFIG_THRUSTMASTER_FF is not set 1364 1343 CONFIG_HID_ZEROPLUS=y 1365 1344 # CONFIG_ZEROPLUS_FF is not set 1345 + # CONFIG_HID_ZYDACRON is not set 1366 1346 CONFIG_USB_SUPPORT=y 1367 1347 CONFIG_USB_ARCH_HAS_HCD=y 1368 1348 CONFIG_USB_ARCH_HAS_OHCI=y ··· 1378 1356 # CONFIG_USB_DEVICEFS is not set 1379 1357 # CONFIG_USB_DEVICE_CLASS is not set 1380 1358 # CONFIG_USB_DYNAMIC_MINORS is not set 1381 - # CONFIG_USB_OTG is not set 1382 1359 # CONFIG_USB_MON is not set 1383 1360 # CONFIG_USB_WUSB is not set 1384 1361 # CONFIG_USB_WUSB_CBAF is not set ··· 1542 1521 # CONFIG_DMADEVICES is not set 1543 1522 # CONFIG_AUXDISPLAY is not set 1544 1523 # CONFIG_UIO is not set 1545 - 1546 - # 1547 - # TI VLYNQ 1548 - # 1549 1524 # CONFIG_STAGING is not set 1550 1525 1551 1526 # ··· 1723 1706 CONFIG_SCHEDSTATS=y 1724 1707 # CONFIG_TIMER_STATS is not set 1725 1708 # CONFIG_DEBUG_OBJECTS is not set 1726 - # CONFIG_SLUB_DEBUG_ON is not set 1727 - # CONFIG_SLUB_STATS is not set 1709 + # CONFIG_DEBUG_SLAB is not set 1710 + # CONFIG_DEBUG_KMEMLEAK is not set 1728 1711 # CONFIG_DEBUG_RT_MUTEXES is not set 1729 1712 # CONFIG_RT_MUTEX_TESTER is not set 1730 1713 # CONFIG_DEBUG_SPINLOCK is not set ··· 1759 1742 # CONFIG_DEBUG_PAGEALLOC is not set 1760 1743 CONFIG_NOP_TRACER=y 1761 1744 CONFIG_HAVE_FUNCTION_TRACER=y 1745 + CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y 1746 + CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y 1747 + CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y 1762 1748 CONFIG_HAVE_DYNAMIC_FTRACE=y 1763 1749 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y 1764 1750 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y ··· 1789 1769 # CONFIG_RING_BUFFER_BENCHMARK is not set 1790 1770 # CONFIG_DYNAMIC_DEBUG is not set 1791 1771 # CONFIG_DMA_API_DEBUG is not set 1772 + # CONFIG_ATOMIC64_SELFTEST is not set 1792 1773 # CONFIG_SAMPLES is not set 1793 1774 CONFIG_HAVE_ARCH_KGDB=y 1794 1775 # CONFIG_KGDB is not set 1795 1776 # CONFIG_DEBUG_STACK_USAGE is not set 1796 1777 # CONFIG_DEBUG_DCFLUSH is not set 1797 - # CONFIG_STACK_DEBUG is not set 1798 1778 # CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set 1799 1779 1800 1780 # ··· 1915 1895 # 1916 1896 # CONFIG_CRYPTO_ANSI_CPRNG is not set 1917 1897 CONFIG_CRYPTO_HW=y 1898 + # CONFIG_CRYPTO_DEV_NIAGARA2 is not set 1918 1899 # CONFIG_CRYPTO_DEV_HIFN_795X is not set 1919 1900 CONFIG_BINARY_PRINTF=y 1920 1901
-1
arch/sparc/include/asm/cache.h
··· 11 11 12 12 #define L1_CACHE_SHIFT 5 13 13 #define L1_CACHE_BYTES 32 14 - #define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) 15 14 16 15 #ifdef CONFIG_SPARC32 17 16 #define SMP_CACHE_BYTES_SHIFT 5
+2 -3
arch/sparc/include/asm/pgtable_32.h
··· 142 142 #define pmd_page(pmd) BTFIXUP_CALL(pmd_page)(pmd) 143 143 #define pgd_page_vaddr(pgd) BTFIXUP_CALL(pgd_page_vaddr)(pgd) 144 144 145 - BTFIXUPDEF_SETHI(none_mask) 146 145 BTFIXUPDEF_CALL_CONST(int, pte_present, pte_t) 147 146 BTFIXUPDEF_CALL(void, pte_clear, pte_t *) 148 147 149 148 static inline int pte_none(pte_t pte) 150 149 { 151 - return !(pte_val(pte) & ~BTFIXUP_SETHI(none_mask)); 150 + return !pte_val(pte); 152 151 } 153 152 154 153 #define pte_present(pte) BTFIXUP_CALL(pte_present)(pte) ··· 159 160 160 161 static inline int pmd_none(pmd_t pmd) 161 162 { 162 - return !(pmd_val(pmd) & ~BTFIXUP_SETHI(none_mask)); 163 + return !pmd_val(pmd); 163 164 } 164 165 165 166 #define pmd_bad(pmd) BTFIXUP_CALL(pmd_bad)(pmd)
+1
arch/sparc/kernel/perf_event.c
··· 657 657 cpuc->current_idx[i] = idx; 658 658 659 659 enc = perf_event_get_enc(cpuc->events[i]); 660 + pcr &= ~mask_for_index(idx); 660 661 pcr |= event_encoding(enc, idx); 661 662 } 662 663 out:
+1 -1
arch/sparc/kernel/sun4d_irq.c
··· 183 183 goto out_unlock; 184 184 } 185 185 186 - if (action && tmp) 186 + if (tmp) 187 187 tmp->next = action->next; 188 188 else 189 189 *actionp = action->next;
+1 -1
arch/sparc/kernel/ttable.S
··· 64 64 tl0_irq6: BTRAP(0x46) 65 65 #endif 66 66 tl0_irq7: TRAP_IRQ(deferred_pcr_work_irq, 7) 67 - #ifdef CONFIG_KGDB 67 + #if defined(CONFIG_KGDB) && defined(CONFIG_SMP) 68 68 tl0_irq8: TRAP_IRQ(smp_kgdb_capture_client, 8) 69 69 #else 70 70 tl0_irq8: BTRAP(0x48)
-2
arch/sparc/mm/srmmu.c
··· 2215 2215 BTFIXUPSET_CALL(pmd_page, srmmu_pmd_page, BTFIXUPCALL_NORM); 2216 2216 BTFIXUPSET_CALL(pgd_page_vaddr, srmmu_pgd_page, BTFIXUPCALL_NORM); 2217 2217 2218 - BTFIXUPSET_SETHI(none_mask, 0xF0000000); 2219 - 2220 2218 BTFIXUPSET_CALL(pte_present, srmmu_pte_present, BTFIXUPCALL_NORM); 2221 2219 BTFIXUPSET_CALL(pte_clear, srmmu_pte_clear, BTFIXUPCALL_SWAPO0G0); 2222 2220
-3
arch/sparc/mm/sun4c.c
··· 2087 2087 2088 2088 BTFIXUPSET_CALL(set_pte, sun4c_set_pte, BTFIXUPCALL_STO1O0); 2089 2089 2090 - /* The 2.4.18 code does not set this on sun4c, how does it work? XXX */ 2091 - /* BTFIXUPSET_SETHI(none_mask, 0x00000000); */ /* Defaults to zero? */ 2092 - 2093 2090 BTFIXUPSET_CALL(pte_pfn, sun4c_pte_pfn, BTFIXUPCALL_NORM); 2094 2091 #if 0 /* PAGE_SHIFT <= 12 */ /* Eek. Investigate. XXX */ 2095 2092 BTFIXUPSET_CALL(pmd_page, sun4c_pmd_page, BTFIXUPCALL_ANDNINT(PAGE_SIZE - 1));
+2 -2
drivers/sbus/char/openprom.c
··· 554 554 static int openprom_bsd_ioctl(struct file * file, 555 555 unsigned int cmd, unsigned long arg) 556 556 { 557 - DATA *data = (DATA *) file->private_data; 557 + DATA *data = file->private_data; 558 558 void __user *argp = (void __user *)arg; 559 559 int err; 560 560 ··· 601 601 static long openprom_ioctl(struct file * file, 602 602 unsigned int cmd, unsigned long arg) 603 603 { 604 - DATA *data = (DATA *) file->private_data; 604 + DATA *data = file->private_data; 605 605 606 606 switch (cmd) { 607 607 case OPROMGETOPT:
+3 -1
drivers/serial/suncore.c
··· 71 71 72 72 con->index = line; 73 73 drv->cons = con; 74 - add_preferred_console(con->name, line, NULL); 74 + 75 + if (!console_set_on_cmdline) 76 + add_preferred_console(con->name, line, NULL); 75 77 76 78 return 1; 77 79 }
+9 -4
drivers/serial/sunsu.c
··· 1500 1500 static int __devexit su_remove(struct of_device *op) 1501 1501 { 1502 1502 struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); 1503 + bool kbdms = false; 1503 1504 1504 1505 if (up->su_type == SU_PORT_MS || 1505 - up->su_type == SU_PORT_KBD) { 1506 + up->su_type == SU_PORT_KBD) 1507 + kbdms = true; 1508 + 1509 + if (kbdms) { 1506 1510 #ifdef CONFIG_SERIO 1507 1511 serio_unregister_port(&up->serio); 1508 1512 #endif 1509 - kfree(up); 1510 - } else if (up->port.type != PORT_UNKNOWN) { 1513 + } else if (up->port.type != PORT_UNKNOWN) 1511 1514 uart_remove_one_port(&sunsu_reg, &up->port); 1512 - } 1513 1515 1514 1516 if (up->port.membase) 1515 1517 of_iounmap(&op->resource[0], up->port.membase, up->reg_size); 1518 + 1519 + if (kbdms) 1520 + kfree(up); 1516 1521 1517 1522 dev_set_drvdata(&op->dev, NULL); 1518 1523
+1 -1
include/math-emu/op-common.h
··· 799 799 X##_e -= (_FP_W_TYPE_SIZE - rsize); \ 800 800 X##_e = rsize - X##_e - 1; \ 801 801 \ 802 - if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs < X##_e) \ 802 + if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs <= X##_e) \ 803 803 __FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\ 804 804 _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \ 805 805 if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \
+4
tools/perf/arch/sparc/Makefile
··· 1 + ifndef NO_DWARF 2 + PERF_HAVE_DWARF_REGS := 1 3 + LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o 4 + endif
+43
tools/perf/arch/sparc/util/dwarf-regs.c
··· 1 + /* 2 + * Mapping of DWARF debug register numbers into register names. 3 + * 4 + * Copyright (C) 2010 David S. Miller <davem@davemloft.net> 5 + * 6 + * This program is free software; you can redistribute it and/or 7 + * modify it under the terms of the GNU General Public License 8 + * as published by the Free Software Foundation; either version 9 + * 2 of the License, or (at your option) any later version. 10 + */ 11 + 12 + #include <libio.h> 13 + #include <dwarf-regs.h> 14 + 15 + #define SPARC_MAX_REGS 96 16 + 17 + const char *sparc_regs_table[SPARC_MAX_REGS] = { 18 + "%g0", "%g1", "%g2", "%g3", "%g4", "%g5", "%g6", "%g7", 19 + "%o0", "%o1", "%o2", "%o3", "%o4", "%o5", "%sp", "%o7", 20 + "%l0", "%l1", "%l2", "%l3", "%l4", "%l5", "%l6", "%l7", 21 + "%i0", "%i1", "%i2", "%i3", "%i4", "%i5", "%fp", "%i7", 22 + "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7", 23 + "%f8", "%f9", "%f10", "%f11", "%f12", "%f13", "%f14", "%f15", 24 + "%f16", "%f17", "%f18", "%f19", "%f20", "%f21", "%f22", "%f23", 25 + "%f24", "%f25", "%f26", "%f27", "%f28", "%f29", "%f30", "%f31", 26 + "%f32", "%f33", "%f34", "%f35", "%f36", "%f37", "%f38", "%f39", 27 + "%f40", "%f41", "%f42", "%f43", "%f44", "%f45", "%f46", "%f47", 28 + "%f48", "%f49", "%f50", "%f51", "%f52", "%f53", "%f54", "%f55", 29 + "%f56", "%f57", "%f58", "%f59", "%f60", "%f61", "%f62", "%f63", 30 + }; 31 + 32 + /** 33 + * get_arch_regstr() - lookup register name from it's DWARF register number 34 + * @n: the DWARF register number 35 + * 36 + * get_arch_regstr() returns the name of the register in struct 37 + * regdwarfnum_table from it's DWARF register number. If the register is not 38 + * found in the table, this returns NULL; 39 + */ 40 + const char *get_arch_regstr(unsigned int n) 41 + { 42 + return (n <= SPARC_MAX_REGS) ? sparc_regs_table[n] : NULL; 43 + }