Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\tsx.c Create Date:2022-07-28 07:57:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:tsx_init

Proto:void __init tsx_init(void)

Type:void

Parameter:Nothing

86  char arg[5] = {}
89  If Not tsx_ctrl_is_supported() Then Return
92  ret = cmdline_find_option(boot_command_line, "tsx", arg, size of arg )
93  If ret >= 0 Then
94  If Not strcmp(arg, "on") Then
96  Else if Not strcmp(arg, "off") Then
98  Else if Not strcmp(arg, "auto") Then
100  Else
102  pr_err("tsx: invalid option, defaulting to off\n")
104  Else
106  If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_X86_INTEL_TSX_MODE_AUTO) Then tsx_ctrl_state = x86_get_tsx_auto_mode()
108  Else if IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_X86_INTEL_TSX_MODE_OFF) Then tsx_ctrl_state = TSX_CTRL_DISABLE
110  Else tsx_ctrl_state = TSX_CTRL_ENABLE
114  If tsx_ctrl_state == TSX_CTRL_DISABLE Then
115  tsx_disable()
122  setup_clear_cpu_cap(Restricted Transactional Memory )
123  setup_clear_cpu_cap(Hardware Lock Elision )
124  Else if tsx_ctrl_state == TSX_CTRL_ENABLE Then
132  tsx_enable()
138  setup_force_cpu_cap(Restricted Transactional Memory )
139  setup_force_cpu_cap(Hardware Lock Elision )