Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9154905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:30:19+00:00 2026-06-17T12:30:19+00:00

I have this typical requirement here: There’s a file in kernel /arch/arm/lib/csumpartial.S which has

  • 0

I have this typical requirement here:

There’s a file in kernel /arch/arm/lib/csumpartial.S which has a function named csumpartial() which computes 16-bit checksum ( which obviously is assembly coded), and this function is exported with the EXPORT symbol.

I have now implemented the same function with NEON optimizations using intrinsics which is in a file named csumpartial.c

I have the following requirements:

  1. Now I want my version of function ‘csumpartial’ to be called by the calling kernel functions instead of the assembly version.

    –To achieve this, should I replace the csumpartial.S file with my csumpartial.C file? But then how to replace ( what all things need to be taken care of)?

  2. This csumpartial.c file should be compiled with a special compiler flags -mfpu=neon -mfloat-abi=softfp -flax-vector-conversions -O3 for NEON optimization.

    — So where and how to mention this compiler flag?

In short, the assembly version should be completely deprecated and the c version should be compiled with the -mfpu=neon -mfloat-abi=softfp -flax-vector-conversions -O3 flags while the kernel is compiled. And the c version of the function should be called, when someone from kernel calls csumpartial

Early help would be much appreciated.

Few inputs:

  1. Linux version 2.6.37
  2. cross compiling for arm using cross compiler tools ( cgt_a8/arm-2009q1)
  3. coding for ARM cortex-a8

Let me know for any more inputs

Note: Only I’ll be using this edited kernel, so I understand the risks involved with such a replacement

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:30:20+00:00Added an answer on June 17, 2026 at 12:30 pm

    I have resolved this with a hack, here are the things I did to get it working:

    Figured out two alternate ways to do this:

    1. Replaced the csumpartial.S with csumpartial.c under arch/arm/lib/ and since csumpartial.c contains NEON instructions and has to be compiled with special compiler flags, add this line to Makefile:

      CFLAGS_csumpartial.o += -mfpu=neon -mfloag-abi=softfp -mflax-vector-conversions -O3

      (in some case this shouldn’t work, due to conflicting compiler flags to that of neon flags , during the compile time)

      we can filter out the conflicting compiler flags, by using filter-out function in the Makefile, but then we will have another issue that the filtered out flags wont be available for other files as well (since we want to negate out the compiler flags only for csumpartial file, so this will be a problem)

      so I figured out alternate way (2)

    2. To be very clear, I did the following steps:

      a. Delete the csumpartial.S from arch/arm/lib

      b. Remove the csumpartial.o entry from the Makefile under this folder

      c. Create a new folder neon under arch/arm/lib

      d. add the csumpartial.c file here also create a Makefile and add this to the Makefile

      arch/arm/lib/neon/Makefile

      KBUILD_CFLAGS += -mfpu=neon -mfloat-abi=softfp -flax-vector-conversions -O3,

      as to negate the conflicting compiler flags during the compile time, use the following lines:

      KBUILD_FLAGS := $(filter-out -compiler-flags-to-negate, $(KBUILD_FLAGS))

      lib-y := csumpartial.o

      e. to the topmost Makefile i.e. arch/arm/Makefile add this libs-y+=arch/arm/lib/ arch/arm/lib/neon/

    that worked for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's a scenario: I have a java front end (RCP/SWT) app which currently has
The typical Python threadpool will have a structure like this one: def run(self): while
I have this form, in which i need to populate a combo box with
Hi i have a typical requirement in my web application, i have to fill
Suppose you have this table structure: Patient -> PatientTag -> Tag A typical N:M
I'm asking for something that's a bit weird, but here is my requirement (which
I have an Excel2010 VBA userform that has one comboBox, from which the user
I have typical requirement that, if a user login to application and if he
Currently we have a typical web application, which all the clients access and login
I have this typical problem with select. First let me make it clear that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.