- 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.2k
 
Bluetooth: controller: Fix Tx Buffer Overflow #31813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -16,12 +16,25 @@ static inline void cpu_sleep(void) | |
| #endif | ||
| } | ||
| 
     | 
||
| static inline void cpu_dsb(void) | ||
| static inline void cpu_dmb(void) | ||
| { | ||
| #if defined(CONFIG_CPU_CORTEX_M0) || defined(CONFIG_ARCH_POSIX) | ||
| /* No need of data synchronization barrier */ | ||
| #elif defined(CONFIG_CPU_CORTEX_M4) || defined(CONFIG_CPU_CORTEX_M33) | ||
| __DSB(); | ||
| #if defined(CONFIG_CPU_CORTEX_M) | ||
| /* NOTE: Refer to ARM Cortex-M Programming Guide to Memory Barrier | ||
| * Instructions, Section 4.1 Normal access in memories | ||
| * | ||
| * Implementation: In the Cortex-M processors data transfers are | ||
| * carried out in the programmed order. | ||
| * | ||
| * Hence, there is no need to use a memory barrier instruction between | ||
| * each access. Only a compiler memory clobber is sufficient. | ||
| */ | ||
| __asm__ volatile ("" : : : "memory"); | ||
| #elif defined(CONFIG_ARCH_POSIX) | ||
| /* FIXME: Add necessary host machine required Data Memory Barrier | ||
| * instruction alongwith the below defined compiler memory | ||
| * clobber. | ||
| */ | ||
| __asm__ volatile ("" : : : "memory"); | ||
                
       | 
||
| #else | ||
| #error "Unsupported CPU." | ||
| #endif | ||
| 
          
            
          
           | 
    ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK for now, but I feel this belongs somewhere in
arch/?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will use it, when an interface is available in ARCH, but dont want to go into introducing one now which is going to to be ARM unique.