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 6216161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:11:08+00:00 2026-05-24T07:11:08+00:00

I am working on a Linux module for IA64. My current problem is that

  • 0

I am working on a Linux module for IA64. My current problem is that the driver uses the PAGE_SIZE and PAGE_SHIFT macros for dma page allocation. The problem I am having is that the machine compiling the driver is not the ones that needed to run the driver. So, if the PAGE_SIZE on the compiling machine is 2^14K and the destination machine is 2^16K then the driver fails.

I don’t want to turn this question into a ‘best practice’ issue about compiling modules on machines which are not the ones running the modules. I understand the issues about that. What I found is that people mostly uses getpagesize() or sysconf(_SC_PAGE_SIZE). These two options are out of the ia64 kernel headers so I can’t use them. Is there another way that I could get the runtime PAGE_SIZE?

Options I am looking at:

  • Reading some file in /proc?
  • syscall?
  • Other function that let me calculate the PAGE_SIZE by inference (e.g ORDER, getpageshift, etc)?
  • Other?
  • 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-05-24T07:11:10+00:00Added an answer on May 24, 2026 at 7:11 am

    This is what I finally did:

    • Re-work my current module to take a new module parameter called page_shift and used that to calculate the PAGE_SIZE (PAGE_SIZE = 1 << PAGE_SHIFT)
    • Created a module loader wrapper which gets the current system PAGE_SHIFT using getconf API from libc. This wrapper gets the current system page shift and pass it as a module parameter.

    Right now the module is being loaded on different architectures with different PAGE_SIZE without any problems.

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

Sidebar

Related Questions

I am currently working on an Apache module that uses a large mmap file
Iam working on Ubuntu.(Linux) I want to redirect from the page one.php to two.php,
I'm working on a Linux kernel module for a 2.6.x kernel and I need
On an x86 system, I have a Linux kernel module (watcher module) that gets
I'm working on Linux gcc environment and I need to initilize function arguments that
I am working in Linux and i have a little bit confusion that whether
So I'm working on a linux Kernel module which requires an infinite waiting loop
I'm working with Python's Mechanize module. I've come across 3 different sites that cannot
I have a problem compiling Haskell programs, that import the Text.Regex.Posix module. I have
I am working on a project that will run on a small linux platform.

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.