I have two questions about “i2c-designware-master IRQ” and “kernel code/data/bss IO memory application”

Issues related to applications and software problems
Post Reply
uniview
Posts: 6
Joined: 2018/12/04 08:16:01

I have two questions about “i2c-designware-master IRQ” and “kernel code/data/bss IO memory application”

Post by uniview » 2018/12/10 12:23:58

Kernel and system related information:
[root@localhost busses]# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[root@localhost busses]# uname -a
Linux localhost 4.16.7 #2 SMP Tue Dec 11 06:21:58 CST 2018 x86_64 x86_64 x86_64 GNU/Linux

Question 1:
Install i2c-designware-core.ko driver in my system,I can get the following information:
16: 0 0 0 0 0 0 0 0 0 0 0 0 IR-IO-APIC 16-fasteoi i2c_designware.0
17: 0 0 0 0 0 0 0 0 0 0 0 0 IR-IO-APIC 17-fasteoi i2c_designware.1
18: 0 0 0 0 0 0 0 0 19434 0 0 0 IR-IO-APIC 18-fasteoi i2c_designware.2
19: 0 0 0 0 0 0 0 0 0 95 0 0 IR-IO-APIC 19-fasteoi i2c_designware.3

In code:
/************************************************************************************
int i2c_dw_probe(struct dw_i2c_dev *dev)
{
if (dev->pm_disabled) {
dev_pm_syscore_device(dev->dev, true);
irq_flags = IRQF_NO_SUSPEND;
} else {
irq_flags = IRQF_SHARED | IRQF_COND_SUSPEND;
}

i2c_dw_disable_int(dev);
ret = devm_request_irq(dev->dev, dev->irq, i2c_dw_isr, irq_flags,
dev_name(dev->dev), dev);
if (ret) {
dev_err(dev->dev, "failure requesting irq %i: %d\n",
dev->irq, ret);
return ret;
}
}
static irqreturn_t i2c_dw_isr(int this_irq, void *dev_id)
{
struct dw_i2c_dev *dev = dev_id;
u32 stat, enabled;

enabled = dw_readl(dev, DW_IC_ENABLE);
stat = dw_readl(dev, DW_IC_RAW_INTR_STAT);
dev_dbg(dev->dev, "enabled=%#x stat=%#x\n", enabled, stat); -- in my system,The values of enabled and stat are 0xffffffff
if (!enabled || !(stat & ~DW_IC_INTR_ACTIVITY))
return IRQ_NONE;

i2c_dw_irq_handler_master(dev);

return IRQ_HANDLED;
}
as follows:
Nov 29 15:52:22 [localhost] kernel: i2c_designware i2c_designware.0: enabled=0xffffffff stat=0xffffffff
Nov 29 15:52:22 [localhost] kernel: i2c_designware i2c_designware.1: enabled=0xffffffff stat=0xffffffff
Nov 29 15:52:22 [localhost] kernel: i2c_designware i2c_designware.2: enabled=0x0 stat=0x0
Nov 29 15:52:22 [localhost] kernel: i2c_designware i2c_designware.3: enabled=0xffffffff stat=0xffffffff
***************************************************************************************/
so,the i2c_dw_isr function must be executed,Where did the values of "enabled=0xffffffff" and "stat=0xffffffff" come from ?
Where is not initialized? Do you have "the TI DAVINCI I2C adapter driver" instructions or any idea?



======================================================
Question 2:
System memory usage is 8G

Why is the value of IO memory space of "kernel code/data/bss" not fixed,Sometimes the application space is as follows:
09600000-0a0031d0 : Kernel code
0a0031d1-0a828dbf : Kernel data
0ad79000-0b071fff : Kernel bss

Sometimes the application space is as follows:
5e600000-5f0031d0 : Kernel code
5f0031d1-5f828dbf : Kernel data
5fd79000-60071fff : Kernel bss

I reserve memory in grub for a service,Sometimes reservation fails because of "kernel code/data/bss" occupation.
When reserving "kernel code/data/bss" memory,What can I do to fix it?

I look forward to your reply. Thank you.

Post Reply