Commit df5f3a1
x86/resctrl: Unwind properly from rdt_enable_ctx()
rdt_enable_ctx() enables the features provided during resctrl mount.
Additions to rdt_enable_ctx() are required to also modify error paths
of rdt_enable_ctx() callers to ensure correct unwinding if errors
are encountered after calling rdt_enable_ctx(). This is error prone.
Introduce rdt_disable_ctx() to refactor the error unwinding of
rdt_enable_ctx() to simplify future additions. This also simplifies
cleanup in rdt_kill_sb().
Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Peter Newman <peternewman@google.com>
Reviewed-by: Tan Shaopeng <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Peter Newman <peternewman@google.com>
Tested-by: Tan Shaopeng <tan.shaopeng@jp.fujitsu.com>
Link: https://lore.kernel.org/r/20231017002308.134480-5-babu.moger@amd.com1 parent d415924 commit df5f3a1
1 file changed
Lines changed: 32 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2308 | 2308 | | |
2309 | 2309 | | |
2310 | 2310 | | |
2311 | | - | |
2312 | | - | |
2313 | | - | |
2314 | | - | |
2315 | | - | |
2316 | | - | |
2317 | | - | |
2318 | | - | |
2319 | 2311 | | |
2320 | 2312 | | |
2321 | 2313 | | |
| |||
2395 | 2387 | | |
2396 | 2388 | | |
2397 | 2389 | | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
2398 | 2397 | | |
2399 | 2398 | | |
2400 | 2399 | | |
2401 | 2400 | | |
2402 | | - | |
| 2401 | + | |
2403 | 2402 | | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
2404 | 2406 | | |
2405 | | - | |
| 2407 | + | |
2406 | 2408 | | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
2407 | 2412 | | |
2408 | | - | |
| 2413 | + | |
2409 | 2414 | | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
2410 | 2420 | | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
2411 | 2426 | | |
2412 | 2427 | | |
2413 | 2428 | | |
| |||
2515 | 2530 | | |
2516 | 2531 | | |
2517 | 2532 | | |
2518 | | - | |
2519 | | - | |
| 2533 | + | |
| 2534 | + | |
2520 | 2535 | | |
2521 | 2536 | | |
2522 | 2537 | | |
2523 | 2538 | | |
2524 | | - | |
| 2539 | + | |
2525 | 2540 | | |
2526 | 2541 | | |
2527 | 2542 | | |
| |||
2580 | 2595 | | |
2581 | 2596 | | |
2582 | 2597 | | |
2583 | | - | |
2584 | | - | |
2585 | | - | |
2586 | | - | |
2587 | | - | |
| 2598 | + | |
| 2599 | + | |
2588 | 2600 | | |
2589 | 2601 | | |
2590 | 2602 | | |
| |||
2816 | 2828 | | |
2817 | 2829 | | |
2818 | 2830 | | |
2819 | | - | |
| 2831 | + | |
2820 | 2832 | | |
2821 | 2833 | | |
2822 | 2834 | | |
2823 | 2835 | | |
2824 | | - | |
2825 | 2836 | | |
2826 | 2837 | | |
2827 | 2838 | | |
| |||
0 commit comments