config

作者: tslling | 来源:发表于2017-08-18 18:43 被阅读0次

CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE

功能介绍

atomic64自我测试代码用它来检查atomic64_dec_if_positive()函数是否可用。
The atomic64 self-test code uses CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE to check whether atomic64_dec_if_positive() is available.It seems it was needed when not every arch defined it. However as of current code the Kconfig option seems needless.

在kernel-fusion/config-4.10.0-25-generic中是否打开

代码位置

arch/parisc/Kconfig
lib/atomic64_test.c

相关代码分析

kernel-huawei/arch/parisc/Kconfig里没有此配置,kernel-android/arch/parisc/Kconfig中如下:

config ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
             def_bool y if GENERIC_ATOMIC64

GENERIC_ATOMIC64在lib/Kconfig中,kernel-android与kernel-huawei下面两者一致,如下:

config GENERIC_ATOMIC64
       bool

lib/atomic64_test.c,kernel-android中的如下:

#ifdef CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
    INIT(onestwos);
    BUG_ON(atomic64_dec_if_positive(&v) != (onestwos - 1));
    r -= one;
    BUG_ON(v.counter != r);
    INIT(0);
    BUG_ON(atomic64_dec_if_positive(&v) != -one);
    BUG_ON(v.counter != r);
    INIT(-one);
    BUG_ON(atomic64_dec_if_positive(&v) != (-one - one));
    BUG_ON(v.counter != r);
#else
    #warning Please implement atomic64_dec_if_positive for your architecture and select the above Kconfig symbol
#endif

而kernel-huawei的则是去掉了第一行和最后三行。

修改建议

无需修改

CONFIG_BLK_DEV_RAM

功能介绍

设置为y意味着允许系统把一部分内存当作块设备(block device)使用,可以像使用块设备(比如硬盘)一样在上面建立文件系统、读写等操作。它一般在初次安装Linux时用于从软盘(floppy)上加载并存储一份最小根文件系统的拷贝。大部分用户不需要此功能,因此可以设置成“N”。(Saying Y here will allow you to use a portion of your RAM memory as a block device, so that you can make file systems on it, read and write to it and do all the other things that you can do with normal block devices (such as hard drives). It is usually used to load and store a copy of a minimal root file system off of a floppy into RAM during the initial install of Linux. )

在kernel-fusion/config-4.10-25-generic中是否打开

代码位置

drivers/block/Kconfig

相关代码分析

kenel-andorid与kernel-huawei中一致,如下:

config BLK_DEV_RAM
    tristate "RAM block device support"
config BLK_DEV_RAM_COUNT
    int "Default number of RAM disks"
    default "16"
    depends on BLK_DEV_RAM
config BLK_DEV_RAM_SIZE
    int "Default RAM disk size (kbytes)"
    depends on BLK_DEV_RAM
    default "4096"
config BLK_DEV_RAM_DAX
    bool "Support Direct Access (DAX) to RAM block devices"
    depends on BLK_DEV_RAM && FS_DAX
    default n

修改建议

无需修改

相关文章

  • info There appears to be trouble

    yarn config delete proxynpm config rm proxynpm config rm ...

  • config

    请求config-server: 如果有label的话,即版本号,需要在后面拼接上/版本号,例如/1.08.20

  • Config

    shiroConfig.java redisConfig.java DruidConfig.java

  • config

    CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 功能介绍 atomic64自我测...

  • config

    maxConnectionNumber 最大连接数,默认100 clearIdleSession...

  • Config

  • Config

    选取某一个模块 导入一个模块 建立builder.py文件 当需要使用config中的backbone参数信息时,...

  • webpack 笔记

    --config npx webpack --config webpack.config.js If a webp...

  • egg之sequelize 使用记录

    环境搭建用了宝塔,方便快速。 一.安装依赖 二.config/config.js 三.config/config....

  • 手写一个laravel(五)配置读取

    配置读取 创建Config class, namespace 为Slavavel\Config\Config 在A...

网友评论

      本文标题:config

      本文链接:https://www.haomeiwen.com/subject/ytmarxtx.html