Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/Makefile b/Makefile
- index 47d4d82..9f10503 100644
- --- a/Makefile
- +++ b/Makefile
- @@ -5,7 +5,8 @@
- include chosen_board.mk
- SUDO=sudo
- -CROSS_COMPILE=$(COMPILE_TOOL)/arm-linux-gnueabi-
- +#CROSS_COMPILE=/usr/local/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
- +CROSS_COMPILE=/usr/local/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-
- OUTPUT_DIR=$(CURDIR)/output
- U_CONFIG_H=$(U_O_PATH)/include/config.h
- diff --git a/build.sh b/build.sh
- index b32f4f1..97b56d8 100755
- --- a/build.sh
- +++ b/build.sh
- @@ -2,6 +2,9 @@
- # (c) 2015, Leo Xu <otakunekop@banana-pi.org.cn>
- # Build script for BPI-M3-BSP 2015.07.29
- +#export PATH="/usr/local/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf/bin/:$PATH"
- +export PATH="/usr/local/gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabi/bin/:$PATH"
- +
- cp_download_files()
- {
- . ./chosen_board.mk
- diff --git a/linux-sunxi/arch/arm/configs/sun8iw6p1smp_bpi_defconfig b/linux-sunxi/arch/arm/configs/sun8iw6p1smp_bpi_defconfig
- old mode 100755
- new mode 100644
- index 0ec1ed7..335837f
- --- a/linux-sunxi/arch/arm/configs/sun8iw6p1smp_bpi_defconfig
- +++ b/linux-sunxi/arch/arm/configs/sun8iw6p1smp_bpi_defconfig
- @@ -77,7 +77,8 @@ CONFIG_RCU_FANOUT=32
- # CONFIG_RCU_FAST_NO_HZ is not set
- # CONFIG_TREE_RCU_TRACE is not set
- # CONFIG_RCU_BOOST is not set
- -# CONFIG_IKCONFIG is not set
- +CONFIG_IKCONFIG=y
- +CONFIG_IKCONFIG_PROC=y
- CONFIG_LOG_BUF_SHIFT=17
- CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
- CONFIG_CGROUPS=y
- @@ -111,7 +112,7 @@ CONFIG_MM_OWNER=y
- # CONFIG_SYSFS_DEPRECATED is not set
- CONFIG_RELAY=y
- # CONFIG_BLK_DEV_INITRD is not set
- -CONFIG_CC_OPTIMIZE_FOR_SIZE=y
- +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
- CONFIG_SYSCTL=y
- CONFIG_ANON_INODES=y
- CONFIG_PANIC_TIMEOUT=0
- @@ -1963,7 +1964,30 @@ CONFIG_GPIO_SYSFS=y
- #
- # MODULbus GPIO expanders:
- #
- -# CONFIG_W1 is not set
- +CONFIG_W1=m
- +CONFIG_W1_CON=y
- +
- +#
- +# 1-wire Bus Masters
- +#
- +CONFIG_W1_MASTER_DS2490=m
- +CONFIG_W1_MASTER_DS2482=m
- +CONFIG_W1_MASTER_DS1WM=m
- +CONFIG_W1_MASTER_GPIO=m
- +
- +#
- +# 1-wire Slaves
- +#
- +CONFIG_W1_SLAVE_THERM=m
- +# CONFIG_W1_SLAVE_SMEM is not set
- +# CONFIG_W1_SLAVE_DS2408 is not set
- +# CONFIG_W1_SLAVE_DS2423 is not set
- +# CONFIG_W1_SLAVE_DS2431 is not set
- +# CONFIG_W1_SLAVE_DS2433 is not set
- +# CONFIG_W1_SLAVE_DS2760 is not set
- +# CONFIG_W1_SLAVE_DS2780 is not set
- +# CONFIG_W1_SLAVE_DS2781 is not set
- +# CONFIG_W1_SLAVE_BQ27000 is not set
- CONFIG_POWER_SUPPLY=y
- CONFIG_AW_AXP=y
- CONFIG_AW_AXP81X=y
- @@ -2915,6 +2939,7 @@ CONFIG_USB_DEVICE_CLASS=y
- # CONFIG_USB_DYNAMIC_MINORS is not set
- CONFIG_USB_SUSPEND=y
- # CONFIG_USB_OTG is not set
- +# CONFIG_USB_OTG_BLACKLIST_HUB is not set
- # CONFIG_USB_DWC3 is not set
- # CONFIG_USB_SUNXI is not set
- # CONFIG_USB_MON is not set
- @@ -3315,6 +3340,44 @@ CONFIG_SUNXI_DMA=y
- # Microsoft Hyper-V guest support
- #
- # CONFIG_STAGING is not set
- +# CONFIG_USBIP_CORE is not set
- +# CONFIG_W35UND is not set
- +# CONFIG_PRISM2_USB is not set
- +# CONFIG_ECHO is not set
- +# CONFIG_ASUS_OLED is not set
- +# CONFIG_PANEL is not set
- +# CONFIG_RTLLIB is not set
- +# CONFIG_R8712U is not set
- +# CONFIG_RTS5139 is not set
- +# CONFIG_TRANZPORT is not set
- +# CONFIG_LINE6_USB is not set
- +# CONFIG_USB_SERIAL_QUATECH2 is not set
- +# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
- +# CONFIG_VT6656 is not set
- +# CONFIG_IIO is not set
- +CONFIG_ZRAM=y
- +# CONFIG_ZRAM_DEBUG is not set
- +CONFIG_ZSMALLOC=y
- +# CONFIG_FB_SM7XX is not set
- +# CONFIG_USB_ENESTORAGE is not set
- +# CONFIG_BCM_WIMAX is not set
- +# CONFIG_FT1000 is not set
- +
- +#
- +# Speakup console speech
- +#
- +# CONFIG_SPEAKUP is not set
- +# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
- +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set
- +# CONFIG_STAGING_MEDIA is not set
- +
- +#
- +# Android
- +#
- +# CONFIG_ANDROID is not set
- +# CONFIG_PHONE is not set
- +# CONFIG_USB_WPAN_HCD is not set
- +# CONFIG_SUNXIOOPS is not set
- CONFIG_CLKDEV_LOOKUP=y
- CONFIG_HAVE_CLK_PREPARE=y
- CONFIG_COMMON_CLK=y
- @@ -3373,7 +3436,9 @@ CONFIG_FS_MBCACHE=y
- # CONFIG_JFS_FS is not set
- # CONFIG_XFS_FS is not set
- # CONFIG_GFS2_FS is not set
- -# CONFIG_BTRFS_FS is not set
- +CONFIG_BTRFS_FS=m
- +CONFIG_BTRFS_FS_POSIX_ACL=y
- +# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
- # CONFIG_NILFS2_FS is not set
- CONFIG_FS_POSIX_ACL=y
- CONFIG_EXPORTFS=y
- @@ -3392,6 +3457,7 @@ CONFIG_QUOTACTL=y
- CONFIG_AUTOFS4_FS=y
- CONFIG_FUSE_FS=y
- CONFIG_CUSE=y
- +CONFIG_GENERIC_ACL=y
- #
- # Caches
- @@ -3434,8 +3500,8 @@ CONFIG_PROC_SYSCTL=y
- CONFIG_PROC_PAGE_MONITOR=y
- CONFIG_SYSFS=y
- CONFIG_TMPFS=y
- -# CONFIG_TMPFS_POSIX_ACL is not set
- -# CONFIG_TMPFS_XATTR is not set
- +CONFIG_TMPFS_POSIX_ACL=y
- +CONFIG_TMPFS_XATTR=y
- # CONFIG_HUGETLB_PAGE is not set
- # CONFIG_CONFIGFS_FS is not set
- CONFIG_MISC_FILESYSTEMS=y
- @@ -3562,8 +3628,8 @@ CONFIG_DETECT_HUNG_TASK=y
- CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
- # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
- CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
- -CONFIG_SCHED_DEBUG=y
- -CONFIG_SCHEDSTATS=y
- +# CONFIG_SCHED_DEBUG is not set
- +# CONFIG_SCHEDSTATS is not set
- CONFIG_TIMER_STATS=y
- # CONFIG_DEBUG_OBJECTS is not set
- # CONFIG_SLUB_DEBUG_ON is not set
- @@ -3599,7 +3665,7 @@ CONFIG_FRAME_POINTER=y
- # CONFIG_BOOT_PRINTK_DELAY is not set
- # CONFIG_RCU_TORTURE_TEST is not set
- CONFIG_RCU_CPU_STALL_TIMEOUT=60
- -CONFIG_RCU_CPU_STALL_VERBOSE=y
- +# CONFIG_RCU_CPU_STALL_VERBOSE is not set
- # CONFIG_RCU_CPU_STALL_INFO is not set
- # CONFIG_RCU_TRACE is not set
- # CONFIG_BACKTRACE_SELF_TEST is not set
- diff --git a/linux-sunxi/arch/arm/mach-sunxi/pm/standby/standby.code b/linux-sunxi/arch/arm/mach-sunxi/pm/standby/standby.code
- index c52d32a..7019d00 100755
- Binary files a/linux-sunxi/arch/arm/mach-sunxi/pm/standby/standby.code and b/linux-sunxi/arch/arm/mach-sunxi/pm/standby/standby.code differ
- diff --git a/linux-sunxi/arch/arm/mach-sunxi/pm/standby/super/resume/resume1.code b/linux-sunxi/arch/arm/mach-sunxi/pm/standby/super/resume/resume1.code
- index a91f33e..d7fe326 100644
- Binary files a/linux-sunxi/arch/arm/mach-sunxi/pm/standby/super/resume/resume1.code and b/linux-sunxi/arch/arm/mach-sunxi/pm/standby/super/resume/resume1.code differ
- diff --git a/linux-sunxi/arch/arm/mach-sunxi/power/brom/Makefile b/linux-sunxi/arch/arm/mach-sunxi/power/brom/Makefile
- index 5bce9ee..b7b36d8 100755
- --- a/linux-sunxi/arch/arm/mach-sunxi/power/brom/Makefile
- +++ b/linux-sunxi/arch/arm/mach-sunxi/power/brom/Makefile
- @@ -5,7 +5,7 @@ targets := resumes.elf
- #use "-Os" flags.
- #Don't use "-O2" flags.
- -KBUILD_CFLAGS := -g -c -nostdlib -march=armv7-a -marm -fno-unwind-tables -fno-asynchronous-unwind-tables -mlittle-endian -O2 --min_array_alignment=4 --no_unaligned_access
- +KBUILD_CFLAGS := -g -c -nostdlib -march=armv7-a -marm -fno-unwind-tables -fno-asynchronous-unwind-tables -mlittle-endian -O2
- #Include the cur dir.
- KBUILD_CPPFLAGS += -I.
- diff --git a/linux-sunxi/arch/arm/mm/dma-mapping.c b/linux-sunxi/arch/arm/mm/dma-mapping.c
- index 5e2530c..ee9a374 100755
- --- a/linux-sunxi/arch/arm/mm/dma-mapping.c
- +++ b/linux-sunxi/arch/arm/mm/dma-mapping.c
- @@ -576,7 +576,7 @@ static void __free_from_contiguous(struct device *dev, struct page *page,
- dma_release_from_contiguous(dev, page, size >> PAGE_SHIFT);
- }
- -inline pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot)
- +pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot)
- {
- prot = dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs) ?
- pgprot_writecombine(prot) :
- diff --git a/linux-sunxi/drivers/gpu/ion/ion_cma_heap.c b/linux-sunxi/drivers/gpu/ion/ion_cma_heap.c
- index fdce245..a23983e 100755
- --- a/linux-sunxi/drivers/gpu/ion/ion_cma_heap.c
- +++ b/linux-sunxi/drivers/gpu/ion/ion_cma_heap.c
- @@ -48,7 +48,7 @@ struct ion_cma_buffer_info {
- struct page *dma_alloc_from_contiguous(struct device *dev,
- int count, unsigned int align);
- void __dma_clear_buffer(struct page *page, size_t size);
- -inline pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot);
- +pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot);
- void *__dma_alloc_remap(struct page *page, size_t size, gfp_t gfp,
- pgprot_t prot, const void *caller);
- void __dma_remap(struct page *page, size_t size, pgprot_t prot);
- diff --git a/linux-sunxi/drivers/staging/zsmalloc/Kconfig b/linux-sunxi/drivers/staging/zsmalloc/Kconfig
- index 9084565..0ae13cd 100644
- --- a/linux-sunxi/drivers/staging/zsmalloc/Kconfig
- +++ b/linux-sunxi/drivers/staging/zsmalloc/Kconfig
- @@ -1,5 +1,6 @@
- config ZSMALLOC
- - tristate "Memory allocator for compressed pages"
- + bool "Memory allocator for compressed pages"
- + depends on MMU
- default n
- help
- zsmalloc is a slab-based memory allocator designed to store
- diff --git a/linux-sunxi/drivers/staging/zsmalloc/zsmalloc-main.c b/linux-sunxi/drivers/staging/zsmalloc/zsmalloc-main.c
- index 223c736..b4282d7 100644
- --- a/linux-sunxi/drivers/staging/zsmalloc/zsmalloc-main.c
- +++ b/linux-sunxi/drivers/staging/zsmalloc/zsmalloc-main.c
- @@ -141,7 +141,7 @@
- * ZS_MIN_ALLOC_SIZE and ZS_SIZE_CLASS_DELTA must be multiple of ZS_ALIGN
- * (reason above)
- */
- -#define ZS_SIZE_CLASS_DELTA 16
- +#define ZS_SIZE_CLASS_DELTA (PAGE_SIZE >> 8)
- #define ZS_SIZE_CLASSES ((ZS_MAX_ALLOC_SIZE - ZS_MIN_ALLOC_SIZE) / \
- ZS_SIZE_CLASS_DELTA + 1)
- @@ -226,7 +226,7 @@ struct zs_pool {
- * so that USE_PGTABLE_MAPPING is defined. This causes zsmalloc to use
- * page table mapping rather than copying for object mapping.
- */
- -#if defined(CONFIG_ARM)
- +#if defined(CONFIG_ARM) && !defined(MODULE)
- #define USE_PGTABLE_MAPPING
- #endif
- @@ -240,7 +240,6 @@ struct mapping_area {
- enum zs_mapmode vm_mm; /* mapping mode */
- };
- -
- /* per-cpu VM mapping areas for zspage accesses that cross page boundaries */
- static DEFINE_PER_CPU(struct mapping_area, zs_map_area);
- @@ -254,6 +253,87 @@ static int is_last_page(struct page *page)
- return PagePrivate2(page);
- }
- +/*
- + * A single 'zspage' is composed of many system pages which are
- + * linked together using fields in struct page. This function finds
- + * the first/head page, given any component page of a zspage.
- + */
- +static struct page *get_first_page(struct page *page)
- +{
- + if (is_first_page(page))
- + return page;
- + else
- + return page->first_page;
- +}
- +
- +static struct page *get_next_page(struct page *page)
- +{
- + struct page *next;
- +
- + if (is_last_page(page))
- + next = NULL;
- + else if (is_first_page(page))
- + next = (struct page *)page->private;
- + else
- + next = list_entry(page->lru.next, struct page, lru);
- +
- + return next;
- +}
- +
- +static void zs_copy_map_object(char *buf, struct page *firstpage,
- + int off, int size)
- +{
- + struct page *pages[2];
- + int sizes[2];
- + void *addr;
- +
- + pages[0] = firstpage;
- + pages[1] = get_next_page(firstpage);
- + BUG_ON(!pages[1]);
- +
- + sizes[0] = PAGE_SIZE - off;
- + sizes[1] = size - sizes[0];
- +
- + /* disable page faults to match kmap_atomic() return conditions */
- + pagefault_disable();
- +
- + /* copy object to per-cpu buffer */
- + addr = kmap_atomic(pages[0]);
- + memcpy(buf, addr + off, sizes[0]);
- + kunmap_atomic(addr);
- + addr = kmap_atomic(pages[1]);
- + memcpy(buf + sizes[0], addr, sizes[1]);
- + kunmap_atomic(addr);
- +}
- +
- +static void zs_copy_unmap_object(char *buf, struct page *firstpage,
- + int off, int size)
- +{
- + struct page *pages[2];
- + int sizes[2];
- + void *addr;
- +
- + pages[0] = firstpage;
- + pages[1] = get_next_page(firstpage);
- + BUG_ON(!pages[1]);
- +
- + sizes[0] = PAGE_SIZE - off;
- + sizes[1] = size - sizes[0];
- +
- + /* copy per-cpu buffer to object */
- + addr = kmap_atomic(pages[0]);
- + memcpy(addr + off, buf, sizes[0]);
- + kunmap_atomic(addr);
- + addr = kmap_atomic(pages[1]);
- + memcpy(addr, buf + sizes[0], sizes[1]);
- + kunmap_atomic(addr);
- +
- + /* enable page faults to match kunmap_atomic() return conditions */
- + pagefault_enable();
- +}
- +
- +
- +
- static void get_zspage_mapping(struct page *page, unsigned int *class_idx,
- enum fullness_group *fullness)
- {
- @@ -404,34 +484,14 @@ static int get_pages_per_zspage(int class_size)
- return max_usedpc_order;
- }
- -/*
- - * A single 'zspage' is composed of many system pages which are
- - * linked together using fields in struct page. This function finds
- - * the first/head page, given any component page of a zspage.
- - */
- -static struct page *get_first_page(struct page *page)
- -{
- - if (is_first_page(page))
- - return page;
- - else
- - return page->first_page;
- -}
- -
- -static struct page *get_next_page(struct page *page)
- -{
- - struct page *next;
- -
- - if (is_last_page(page))
- - next = NULL;
- - else if (is_first_page(page))
- - next = (struct page *)page->private;
- - else
- - next = list_entry(page->lru.next, struct page, lru);
- - return next;
- -}
- -/* Encode <page, obj_idx> as a single handle value */
- +/*
- + * Encode <page, obj_idx> as a single handle value.
- + * On hardware platforms with physical memory starting at 0x0 the pfn
- + * could be 0 so we ensure that the handle will never be 0 by adjusting the
- + * encoded obj_idx value before encoding.
- + */
- static void *obj_location_to_handle(struct page *page, unsigned long obj_idx)
- {
- unsigned long handle;
- @@ -442,17 +502,21 @@ static void *obj_location_to_handle(struct page *page, unsigned long obj_idx)
- }
- handle = page_to_pfn(page) << OBJ_INDEX_BITS;
- - handle |= (obj_idx & OBJ_INDEX_MASK);
- + handle |= ((obj_idx + 1) & OBJ_INDEX_MASK);
- return (void *)handle;
- }
- -/* Decode <page, obj_idx> pair from the given object handle */
- +/*
- + * Decode <page, obj_idx> pair from the given object handle. We adjust the
- + * decoded obj_idx back to its original value since it was adjusted in
- + * obj_location_to_handle().
- + */
- static void obj_handle_to_location(unsigned long handle, struct page **page,
- unsigned long *obj_idx)
- {
- *page = pfn_to_page(handle >> OBJ_INDEX_BITS);
- - *obj_idx = handle & OBJ_INDEX_MASK;
- + *obj_idx = (handle & OBJ_INDEX_MASK) - 1;
- }
- static unsigned long obj_idx_to_offset(struct page *page,
- @@ -657,11 +721,8 @@ static inline void __zs_unmap_object(struct mapping_area *area,
- struct page *pages[2], int off, int size)
- {
- unsigned long addr = (unsigned long)area->vm_addr;
- - unsigned long end = addr + (PAGE_SIZE * 2);
- - flush_cache_vunmap(addr, end);
- - unmap_kernel_range_noflush(addr, PAGE_SIZE * 2);
- - flush_tlb_kernel_range(addr, end);
- + unmap_kernel_range(addr, PAGE_SIZE * 2);
- }
- #else /* USE_PGTABLE_MAPPING */
- @@ -1060,3 +1121,4 @@ module_exit(zs_exit);
- MODULE_LICENSE("Dual BSD/GPL");
- MODULE_AUTHOR("Nitin Gupta <ngupta@vflare.org>");
- +
- diff --git a/linux-sunxi/drivers/staging/zsmalloc/zsmalloc_int.h b/linux-sunxi/drivers/staging/zsmalloc/zsmalloc_int.h
- index 92eefc6..37806da 100644
- --- a/linux-sunxi/drivers/staging/zsmalloc/zsmalloc_int.h
- +++ b/linux-sunxi/drivers/staging/zsmalloc/zsmalloc_int.h
- @@ -110,9 +110,8 @@ enum fullness_group {
- static const int fullness_threshold_frac = 4;
- struct mapping_area {
- - struct vm_struct *vm;
- - pte_t *vm_ptes[2];
- - char *vm_addr;
- + char *vm_buf; /* copy buffer for objects that span pages */
- + char *vm_addr; /* address of kmap_atomic()'ed pages */
- };
- struct size_class {
- @@ -153,3 +152,4 @@ struct zs_pool {
- };
- #endif
- +
- diff --git a/u-boot-sunxi/arch/arm/cpu/armv7/config.mk b/u-boot-sunxi/arch/arm/cpu/armv7/config.mk
- index 45c6acb..699132c 100755
- --- a/u-boot-sunxi/arch/arm/cpu/armv7/config.mk
- +++ b/u-boot-sunxi/arch/arm/cpu/armv7/config.mk
- @@ -32,9 +32,9 @@ else
- PLATFORM_CPPFLAGS += -mcpu=cortex-a7
- endif
- -ifndef CONFIG_SPL
- -PLATFORM_CPPFLAGS += -Werror
- -endif
- +#ifndef CONFIG_SPL
- +#PLATFORM_CPPFLAGS += -Werror
- +#endif
- # =========================================================================
- #
- # Supply options according to compiler version
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement