# git rev-parse -q --verify 22db552b50fa11d8c1d171de908a1f9ef62172b7^{commit} 22db552b50fa11d8c1d171de908a1f9ef62172b7 already have revision, skipping fetch # git checkout -q -f -B kisskb 22db552b50fa11d8c1d171de908a1f9ef62172b7 # git clean -qxdf # < git log -1 # commit 22db552b50fa11d8c1d171de908a1f9ef62172b7 # Author: Arnd Bergmann # Date: Tue Jun 19 16:02:27 2018 +0200 # # powerpc/powermac: Fix rtc read/write functions # # As Mathieu pointed out, my conversion to time64_t was incorrect and # resulted in negative times to be read from the RTC. The problem is # that during the conversion from a byte array to a time64_t, the # 'unsigned char' variable holding the top byte gets turned into a # negative signed 32-bit integer before being assigned to the 64-bit # variable for any times after 1972. # # This changes the logic to cast to an unsigned 32-bit number first for # the Macintosh time and then convert that to the Unix time, which then # gives us a time in the documented 1904..2040 year range. I decided not # to use the longer 1970..2106 range that other drivers use, for # consistency with the literal interpretation of the register, but that # could be easily changed if we decide we want to support any Mac after # 2040. # # Just to be on the safe side, I'm also adding a WARN_ON that will # trigger if either the year 2040 has come and is observed by this # driver, or we run into an RTC that got set back to a pre-1970 date for # some reason (the two are indistinguishable). # # For the RTC write functions, Andreas found another problem: both # pmu_request() and cuda_request() are varargs functions, so changing # the type of the arguments passed into them from 32 bit to 64 bit # breaks the API for the set_rtc_time functions. This changes it back to # 32 bits. # # The same code exists in arch/m68k/ and is patched in an identical way # now in a separate patch. # # Fixes: 5bfd643583b2 ("powerpc: use time64_t in read_persistent_clock") # Reported-by: Mathieu Malaterre # Reported-by: Andreas Schwab # Signed-off-by: Arnd Bergmann # Tested-by: Mathieu Malaterre # Signed-off-by: Michael Ellerman # < /opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux-gcc --version # < git log --format=%s --max-count=1 22db552b50fa11d8c1d171de908a1f9ef62172b7 # < make -s -j 40 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc44x_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- ppc44x_defconfig # make -s -j 40 ARCH=powerpc O=/kisskb/build/powerpc-fixes_ppc44x_defconfig_powerpc CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/powerpc-linux/bin/powerpc-linux- /kisskb/src/net/Makefile:24: CC cannot link executables. Skipping bpfilter. /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:183:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/net/Makefile:24: CC cannot link executables. Skipping bpfilter. /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:339:21: note: 'pdeo' was declared here /kisskb/src/net/bridge/br_netlink.c: In function 'br_afspec': /kisskb/src/net/bridge/br_netlink.c:637:7: warning: 'err' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c: In function 'univ8250_release_irq': /kisskb/src/drivers/tty/serial/8250/8250_core.c:251:18: warning: 'i' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/tty/serial/8250/8250_core.c:231:19: note: 'i' was declared here /kisskb/src/drivers/net/tun.c: In function 'tun_get_user': /kisskb/src/drivers/net/tun.c:1835:30: warning: 'copylen' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/net/tun.c:1745:46: warning: 'linear' may be used uninitialized in this function [-Wuninitialized] arch/powerpc/boot/katmai.dtb: Warning (pci_bridge): /plb/pciex@d00000000: node name is not "pci" or "pcie" arch/powerpc/boot/katmai.dtb: Warning (pci_bridge): /plb/pciex@d20000000: node name is not "pci" or "pcie" arch/powerpc/boot/katmai.dtb: Warning (pci_bridge): /plb/pciex@d40000000: node name is not "pci" or "pcie" arch/powerpc/boot/katmai.dtb: Warning (pci_device_bus_num): Failed prerequisite 'pci_bridge' INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x50f3b8) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) INFO: Uncompressed kernel (size 0x51fa64) overlaps the address of the wrapper(0x400000) INFO: Fixing the link_address of wrapper to (0x600000) Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601535 Bytes = 2540.56 kB = 2.48 MB Load Address: 00600000 Entry Point: 00601118 Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601491 Bytes = 2540.52 kB = 2.48 MB Load Address: 00600000 Entry Point: 00601104 Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601501 Bytes = 2540.53 kB = 2.48 MB Load Address: 00600000 Entry Point: 00601100 Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2576564 Bytes = 2516.18 kB = 2.46 MB Load Address: 00000000 Entry Point: 00000000 Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601477 Bytes = 2540.50 kB = 2.48 MB Load Address: 00600000 Entry Point: 0060110c Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601420 Bytes = 2540.45 kB = 2.48 MB Load Address: 00600000 Entry Point: 00601114 Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601468 Bytes = 2540.50 kB = 2.48 MB Load Address: 00600000 Entry Point: 006000a4 Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601547 Bytes = 2540.57 kB = 2.48 MB Load Address: 00600000 Entry Point: 006010f4 Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601431 Bytes = 2540.46 kB = 2.48 MB Load Address: 00600000 Entry Point: 00600178 Image Name: Linux-4.18.0-rc1-g22db552 Created: Wed Jun 27 22:55:15 2018 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 2601902 Bytes = 2540.92 kB = 2.48 MB Load Address: 00600000 Entry Point: 0060110c Completed OK # rm -rf /kisskb/build/powerpc-fixes_ppc44x_defconfig_powerpc # Build took: 0:00:21.276021