1. 03 2月, 2017 1 次提交
    • S
      tty: serial: pl011: add ttyAMA for matching pl011 console · aea9a80b
      Sudeep Holla 提交于
      Commit c7cef0a8 ("console: Add extensible console matching") added
      match() method to struct console which allows the console to perform
      console command line matching instead of (or in addition to) default
      console matching (ie., by fixed name and index).
      
      Commit ad1696f6 ("ACPI: parse SPCR and enable matching console")
      introduced support for SPCR as matching console.
      
      Commit 10879ae5 ("serial: pl011: add console matching function")
      added the match method for pl011 console which checks for the console
      string to be "pl011"
      
      Now on a platform which has both SPCR in the ACPI tables and ttyAMA in
      the command line, the ttyAMA is chosen as "selected console" but it
      doesn't pass the matching console method which results in CON_CONSDEV
      not being set on the "selected console".
      
      As a result of that, the bootconsole(SPCR in the above case) is not
      unregistered and all the beginning boot messages are seen twice.
      
      This patch adds "ttyAMA" so that it's considered to match pl011 console.
      
      Fixes: 10879ae5 ("serial: pl011: add console matching function")
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Aleksey Makarov <aleksey.makarov@linaro.org>
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      aea9a80b
  2. 27 1月, 2017 1 次提交
    • B
      tty: serial: constify uart_ops structures · 2331e068
      Bhumika Goyal 提交于
      Declare uart_ops structures as const as they are only stored in the ops
      field of an uart_port structure. This field is of type const, so
      uart_ops structures having this property can be made const too.
      
      File size details before and after patching.
      First line of every .o file shows the file size before patching
      and second line shows the size after patching.
      
         text	   data	    bss	    dec	    hex	filename
      
         2977	    456	     64	   3497	    da9	drivers/tty/serial/amba-pl010.o
         3169	    272	     64	   3505	    db1	drivers/tty/serial/amba-pl010.o
      
         3109	    456	      0	   3565	    ded	drivers/tty/serial/efm32-uart.o
         3301	    272	      0	   3573	    df5	drivers/tty/serial/efm32-uart.o
      
        10668	    753	      1	  11422	   2c9e	drivers/tty/serial/icom.o
        10860	    561	      1	  11422	   2c9e	drivers/tty/serial/icom.o
      
        23904	    408	      8	  24320	   5f00	drivers/tty/serial/ioc3_serial.o
        24088	    224	      8	  24320	   5f00	drivers/tty/serial/ioc3_serial.o
      
        10516	    560	      4	  11080	   2b48	drivers/tty/serial/ioc4_serial.o
        10709	    368	      4	  11081	   2b49	drivers/tty/serial/ioc4_serial.o
      
         7853	    648	   1216	   9717	   25f5	drivers/tty/serial/mpsc.o
         8037	    456	   1216	   9709	   25ed	drivers/tty/serial/mpsc.o
      
        10248	    456	      0	  10704	   29d0	drivers/tty/serial/omap-serial.o
        10440	    272	      0	  10712	   29d8	drivers/tty/serial/omap-serial.o
      
         8122	    532	   1984	  10638	   298e	drivers/tty/serial/pmac_zilog.o
         8306	    340	   1984	  10630	   2986	drivers/tty/serial/pmac_zilog.o
      
         3808	    456	      0	   4264	   10a8	drivers/tty/serial/pxa.o
         4000	    264	      0	   4264	   10a8	drivers/tty/serial/pxa.o
      
        21781	   3864	      0	  25645	   642d	drivers/tty/serial/serial-tegra.o
        22037	   3608	      0	  25645	   642d	drivers/tty/serial/serial-tegra.o
      
         2481	    456	     96	   3033	    bd9	drivers/tty/serial/sprd_serial.o
         2673	    272	     96	   3041	    be1	drivers/tty/serial/sprd_serial.o
      
         5534	    300	    512	   6346	   18ca	drivers/tty/serial/vr41xx_siu.o
         5630	    204	    512	   6346	   18ca	drivers/tty/serial/vr41xx_siu.o
      
         6730	   1576	    128	   8434	   20f2	drivers/tty/serial/vt8500_serial.o
         6986	   1320	    128	   8434	   20f2	drivers/tty/serial/vt8500_serial.o
      
      Cross compiled for mips architecture.
      
         3005	    488	      0	   3493	    da5	drivers/tty/serial/pnx8xxx_uart.o
         3189	    304	      0	   3493	    da5	drivers/tty/serial/pnx8xxx_uart.o
      
         4272	    196	   1056	   5524	   1594	drivers/tty/serial/dz.o
         4368	    100	   1056	   5524	   1594	drivers/tty/serial/dz.o
      
         6551	    144	     16	   6711	   1a37	drivers/tty/serial/ip22zilog.o
         6647	     48	     16	   6711	   1a37	drivers/tty/serial/ip22zilog.o
      
         9612	    428	   1520	  11560	   2d28	drivers/tty/serial/serial_txx9.o
         9708	    332	   1520	  11560	   2d28	drivers/tty/serial/serial_txx9.o
      
         4156	    296	     16	   4468	   1174	drivers/tty/serial/ar933x_uart.o
         4252	    200	     16	   4468	   1174	drivers/tty/serial/ar933x_uart.o
      
      Cross compiled for arm archiecture.
      
        11716	   1780	     44	  13540	   34e4	drivers/tty/serial/sirfsoc_uart.o
        11808	   1688	     44	  13540	   34e4	drivers/tty/serial/sirfsoc_uart.o
      
        13352	    596	     56	  14004	   36b4	drivers/tty/serial/amba-pl011.o
        13444	    504	     56	  14004	   36b4	drivers/tty/serial/amba-pl011.o
      
      Cross compiled for sparc architecture.
      
         4664	    528	     32	   5224	   1468	drivers/tty/serial/sunhv.o
         4848	    344	     32	   5224	   1468	drivers/tty/serial/sunhv.o
      
         8080	    332	     28	   8440	   20f8	drivers/tty/serial/sunzilog.o
         8184	    228	     28	   8440	   20f8	drivers/tty/serial/sunzilog.o
      
      Cross compiled for ia64 architecture.
      
        10226	    549	    472	  11247	   2bef	drivers/tty/serial/sn_console.o
        10414	    365	    472	  11251	   2bf3	drivers/tty/serial/sn_console.o
      
      The files drivers/tty/serial/zs.o, drivers/tty/serial/lpc32xx_hs.o and
      drivers/tty/serial/lantiq.o did not compile.
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2331e068
  3. 19 1月, 2017 1 次提交
  4. 10 11月, 2016 1 次提交
  5. 27 10月, 2016 1 次提交
  6. 30 9月, 2016 1 次提交
  7. 28 9月, 2016 1 次提交
  8. 27 9月, 2016 1 次提交
  9. 22 9月, 2016 1 次提交
  10. 31 8月, 2016 3 次提交
  11. 26 6月, 2016 1 次提交
    • J
      TTY: serial, handle platform_get_irq retval properly · 394a9e2c
      Jiri Slaby 提交于
      platform_get_irq can fail, so we should handle negative value when
      returned.
      
      [v2]
      
      platform_get_irq can actually return zero on some platforms. So do not
      remove checks for irq == 0 there.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: "Uwe Kleine-König" <kernel@pengutronix.de>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Laxman Dewangan <ldewangan@nvidia.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-serial@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: linux-tegra@vger.kernel.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      394a9e2c
  12. 28 5月, 2016 1 次提交
    • A
      remove lots of IS_ERR_VALUE abuses · 287980e4
      Arnd Bergmann 提交于
      Most users of IS_ERR_VALUE() in the kernel are wrong, as they
      pass an 'int' into a function that takes an 'unsigned long'
      argument. This happens to work because the type is sign-extended
      on 64-bit architectures before it gets converted into an
      unsigned type.
      
      However, anything that passes an 'unsigned short' or 'unsigned int'
      argument into IS_ERR_VALUE() is guaranteed to be broken, as are
      8-bit integers and types that are wider than 'unsigned long'.
      
      Andrzej Hajda has already fixed a lot of the worst abusers that
      were causing actual bugs, but it would be nice to prevent any
      users that are not passing 'unsigned long' arguments.
      
      This patch changes all users of IS_ERR_VALUE() that I could find
      on 32-bit ARM randconfig builds and x86 allmodconfig. For the
      moment, this doesn't change the definition of IS_ERR_VALUE()
      because there are probably still architecture specific users
      elsewhere.
      
      Almost all the warnings I got are for files that are better off
      using 'if (err)' or 'if (err < 0)'.
      The only legitimate user I could find that we get a warning for
      is the (32-bit only) freescale fman driver, so I did not remove
      the IS_ERR_VALUE() there but changed the type to 'unsigned long'.
      For 9pfs, I just worked around one user whose calling conventions
      are so obscure that I did not dare change the behavior.
      
      I was using this definition for testing:
      
       #define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL && \
             unlikely((unsigned long long)(x) >= (unsigned long long)(typeof(x))-MAX_ERRNO))
      
      which ends up making all 16-bit or wider types work correctly with
      the most plausible interpretation of what IS_ERR_VALUE() was supposed
      to return according to its users, but also causes a compile-time
      warning for any users that do not pass an 'unsigned long' argument.
      
      I suggested this approach earlier this year, but back then we ended
      up deciding to just fix the users that are obviously broken. After
      the initial warning that caused me to get involved in the discussion
      (fs/gfs2/dir.c) showed up again in the mainline kernel, Linus
      asked me to send the whole thing again.
      
      [ Updated the 9p parts as per Al Viro  - Linus ]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: https://lkml.org/lkml/2016/1/7/363
      Link: https://lkml.org/lkml/2016/5/27/486
      Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> # For nvmem part
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      287980e4
  13. 01 5月, 2016 1 次提交
  14. 08 3月, 2016 2 次提交
  15. 07 2月, 2016 3 次提交
  16. 07 1月, 2016 2 次提交
  17. 14 12月, 2015 12 次提交
  18. 18 10月, 2015 1 次提交
  19. 05 9月, 2015 5 次提交