Merge branch 'upstream'
This commit is contained in:
Коммит
80c7af4074
|
@ -16,5 +16,7 @@ empeg
|
||||||
- Empeg documentation
|
- Empeg documentation
|
||||||
mem_alignment
|
mem_alignment
|
||||||
- alignment abort handler documentation
|
- alignment abort handler documentation
|
||||||
|
memory.txt
|
||||||
|
- description of the virtual memory layout
|
||||||
nwfpe
|
nwfpe
|
||||||
- NWFPE floating point emulator documentation
|
- NWFPE floating point emulator documentation
|
||||||
|
|
|
@ -50,12 +50,12 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
|
||||||
0. History & News:
|
0. History & News:
|
||||||
2005-06-30 - added support for WideView WT-220U (Thanks to Steve Chang)
|
2005-06-30 - added support for WideView WT-220U (Thanks to Steve Chang)
|
||||||
2005-05-30 - added basic isochronous support to the dvb-usb-framework
|
2005-05-30 - added basic isochronous support to the dvb-usb-framework
|
||||||
added support for Conexant Hybrid reference design and Nebula DigiTV USB
|
added support for Conexant Hybrid reference design and Nebula DigiTV USB
|
||||||
2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework
|
2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework
|
||||||
2005-04-02 - re-enabled and improved remote control code.
|
2005-04-02 - re-enabled and improved remote control code.
|
||||||
2005-03-31 - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.
|
2005-03-31 - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.
|
||||||
2005-03-30 - first commit of the dvb-usb-module based on the dibusb-source. First device is a new driver for the
|
2005-03-30 - first commit of the dvb-usb-module based on the dibusb-source. First device is a new driver for the
|
||||||
TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
|
TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
|
||||||
|
|
||||||
(change from dvb-dibusb to dvb-usb)
|
(change from dvb-dibusb to dvb-usb)
|
||||||
2005-03-28 - added support for the AVerMedia AverTV DVB-T USB2.0 device (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)
|
2005-03-28 - added support for the AVerMedia AverTV DVB-T USB2.0 device (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)
|
||||||
|
@ -64,50 +64,50 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
|
||||||
2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB2
|
2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB2
|
||||||
2005-01-31 - distorted streaming is gone for USB1.1 devices
|
2005-01-31 - distorted streaming is gone for USB1.1 devices
|
||||||
2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb
|
2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb
|
||||||
- first almost working version for HanfTek UMT-010
|
- first almost working version for HanfTek UMT-010
|
||||||
- found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
|
- found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
|
||||||
2005-01-10 - refactoring completed, now everything is very delightful
|
2005-01-10 - refactoring completed, now everything is very delightful
|
||||||
- tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
|
- tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
|
||||||
Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
|
Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
|
||||||
2004-12-29 - after several days of struggling around bug of no returning URBs fixed.
|
2004-12-29 - after several days of struggling around bug of no returning URBs fixed.
|
||||||
2004-12-26 - refactored the dibusb-driver, splitted into separate files
|
2004-12-26 - refactored the dibusb-driver, splitted into separate files
|
||||||
- i2c-probing enabled
|
- i2c-probing enabled
|
||||||
2004-12-06 - possibility for demod i2c-address probing
|
2004-12-06 - possibility for demod i2c-address probing
|
||||||
- new usb IDs (Compro, Artec)
|
- new usb IDs (Compro, Artec)
|
||||||
2004-11-23 - merged changes from DiB3000MC_ver2.1
|
2004-11-23 - merged changes from DiB3000MC_ver2.1
|
||||||
- revised the debugging
|
- revised the debugging
|
||||||
- possibility to deliver the complete TS for USB2.0
|
- possibility to deliver the complete TS for USB2.0
|
||||||
2004-11-21 - first working version of the dib3000mc/p frontend driver.
|
2004-11-21 - first working version of the dib3000mc/p frontend driver.
|
||||||
2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke.
|
2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke.
|
||||||
2004-11-07 - added remote control support. Thanks to David Matthews.
|
2004-11-07 - added remote control support. Thanks to David Matthews.
|
||||||
2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec)
|
2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec)
|
||||||
- merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
|
- merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
|
||||||
- moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
|
- moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
|
||||||
better settled there (added xfer_ops-struct)
|
better settled there (added xfer_ops-struct)
|
||||||
- created a common files for frontends (mc/p/mb)
|
- created a common files for frontends (mc/p/mb)
|
||||||
2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)
|
2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)
|
||||||
2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
|
2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
|
||||||
to Amaury Demol for reporting
|
to Amaury Demol for reporting
|
||||||
- changed usb TS transfer method (several urbs, stopping transfer
|
- changed usb TS transfer method (several urbs, stopping transfer
|
||||||
before setting a new pid)
|
before setting a new pid)
|
||||||
2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks
|
2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks
|
||||||
to Christian Motschke for reporting
|
to Christian Motschke for reporting
|
||||||
2004-09-05 - released the dibusb device and dib3000mb-frontend driver
|
2004-09-05 - released the dibusb device and dib3000mb-frontend driver
|
||||||
|
|
||||||
(old news for vp7041.c)
|
(old news for vp7041.c)
|
||||||
2004-07-15 - found out, by accident, that the device has a TUA6010XS for
|
2004-07-15 - found out, by accident, that the device has a TUA6010XS for
|
||||||
PLL
|
PLL
|
||||||
2004-07-12 - figured out, that the driver should also work with the
|
2004-07-12 - figured out, that the driver should also work with the
|
||||||
CTS Portable (Chinese Television System)
|
CTS Portable (Chinese Television System)
|
||||||
2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working
|
2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working
|
||||||
properly with firmware extracted from 2.422
|
properly with firmware extracted from 2.422
|
||||||
- #if for 2.6.4 (dvb), compile issue
|
- #if for 2.6.4 (dvb), compile issue
|
||||||
- changed firmware handling, see vp7041.txt sec 1.1
|
- changed firmware handling, see vp7041.txt sec 1.1
|
||||||
2004-07-02 - some tuner modifications, v0.1, cleanups, first public
|
2004-07-02 - some tuner modifications, v0.1, cleanups, first public
|
||||||
2004-06-28 - now using the dvb_dmx_swfilter_packets, everything
|
2004-06-28 - now using the dvb_dmx_swfilter_packets, everything
|
||||||
runs fine now
|
runs fine now
|
||||||
2004-06-27 - able to watch and switching channels (pre-alpha)
|
2004-06-27 - able to watch and switching channels (pre-alpha)
|
||||||
- no section filtering yet
|
- no section filtering yet
|
||||||
2004-06-06 - first TS received, but kernel oops :/
|
2004-06-06 - first TS received, but kernel oops :/
|
||||||
2004-05-14 - firmware loader is working
|
2004-05-14 - firmware loader is working
|
||||||
2004-05-11 - start writing the driver
|
2004-05-11 - start writing the driver
|
||||||
|
|
|
@ -174,7 +174,7 @@ Debugging
|
||||||
Everything which is identical in the following table, can be put into a common
|
Everything which is identical in the following table, can be put into a common
|
||||||
flexcop-module.
|
flexcop-module.
|
||||||
|
|
||||||
PCI USB
|
PCI USB
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Different:
|
Different:
|
||||||
Register access: accessing IO memory USB control message
|
Register access: accessing IO memory USB control message
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
HOWTO: Get An Avermedia DVB-T working under Linux
|
HOWTO: Get An Avermedia DVB-T working under Linux
|
||||||
______________________________________________
|
______________________________________________
|
||||||
|
|
||||||
Table of Contents
|
Table of Contents
|
||||||
Assumptions and Introduction
|
Assumptions and Introduction
|
||||||
|
|
|
@ -16,7 +16,7 @@ Hardware supported by the linuxtv.org DVB drivers
|
||||||
shielding, and the whole metal box has its own part number.
|
shielding, and the whole metal box has its own part number.
|
||||||
|
|
||||||
|
|
||||||
o Frontends drivers:
|
o Frontends drivers:
|
||||||
- dvb_dummy_fe: for testing...
|
- dvb_dummy_fe: for testing...
|
||||||
DVB-S:
|
DVB-S:
|
||||||
- ves1x93 : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
|
- ves1x93 : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
|
||||||
|
@ -24,7 +24,7 @@ o Frontends drivers:
|
||||||
- grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
|
- grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
|
||||||
- mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
|
- mt312 : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
|
||||||
- stv0299 : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
|
- stv0299 : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
|
||||||
LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
|
LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
|
||||||
Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB
|
Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB
|
||||||
DVB-C:
|
DVB-C:
|
||||||
- ves1820 : various (ves1820 demodulator, sp5659c or spXXXX PLL)
|
- ves1820 : various (ves1820 demodulator, sp5659c or spXXXX PLL)
|
||||||
|
@ -35,8 +35,8 @@ o Frontends drivers:
|
||||||
- grundig_29504-401 : Grundig 29504-401 (LSI L64781 demodulator), tsa5060 PLL
|
- grundig_29504-401 : Grundig 29504-401 (LSI L64781 demodulator), tsa5060 PLL
|
||||||
- tda1004x : Philips tda10045h (td1344 or tdm1316l PLL)
|
- tda1004x : Philips tda10045h (td1344 or tdm1316l PLL)
|
||||||
- nxt6000 : Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),
|
- nxt6000 : Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),
|
||||||
Comtech DVBT-6k07 (SP5730 PLL)
|
Comtech DVBT-6k07 (SP5730 PLL)
|
||||||
(NxtWave Communications NXT6000 demodulator)
|
(NxtWave Communications NXT6000 demodulator)
|
||||||
- sp887x : Microtune 7202D
|
- sp887x : Microtune 7202D
|
||||||
- dib3000mb : DiBcom 3000-MB demodulator
|
- dib3000mb : DiBcom 3000-MB demodulator
|
||||||
DVB-S/C/T:
|
DVB-S/C/T:
|
||||||
|
|
|
@ -15,7 +15,7 @@ Michael Holzt <kju@debian.org>
|
||||||
|
|
||||||
Diego Picciani <d.picciani@novacomp.it>
|
Diego Picciani <d.picciani@novacomp.it>
|
||||||
for CyberLogin for Linux which allows logging onto EON
|
for CyberLogin for Linux which allows logging onto EON
|
||||||
(in case you are wondering where CyberLogin is, EON changed its login
|
(in case you are wondering where CyberLogin is, EON changed its login
|
||||||
procedure and CyberLogin is no longer used.)
|
procedure and CyberLogin is no longer used.)
|
||||||
|
|
||||||
Martin Schaller <martin@smurf.franken.de>
|
Martin Schaller <martin@smurf.franken.de>
|
||||||
|
@ -57,7 +57,7 @@ Augusto Cardoso <augusto@carhil.net>
|
||||||
Davor Emard <emard@softhome.net>
|
Davor Emard <emard@softhome.net>
|
||||||
for his work on the budget drivers, the demux code,
|
for his work on the budget drivers, the demux code,
|
||||||
the module unloading problems, ...
|
the module unloading problems, ...
|
||||||
|
|
||||||
Hans-Frieder Vogt <hfvogt@arcor.de>
|
Hans-Frieder Vogt <hfvogt@arcor.de>
|
||||||
for his work on calculating and checking the crc's for the
|
for his work on calculating and checking the crc's for the
|
||||||
TechnoTrend/Hauppauge DEC driver firmware
|
TechnoTrend/Hauppauge DEC driver firmware
|
||||||
|
|
|
@ -20,7 +20,7 @@ http://linuxtv.org/downloads/
|
||||||
|
|
||||||
What's inside this directory:
|
What's inside this directory:
|
||||||
|
|
||||||
"cards.txt"
|
"cards.txt"
|
||||||
contains a list of supported hardware.
|
contains a list of supported hardware.
|
||||||
|
|
||||||
"contributors.txt"
|
"contributors.txt"
|
||||||
|
@ -37,7 +37,7 @@ that require it.
|
||||||
contains detailed informations about the
|
contains detailed informations about the
|
||||||
TT DEC2000/DEC3000 USB DVB hardware.
|
TT DEC2000/DEC3000 USB DVB hardware.
|
||||||
|
|
||||||
"bt8xx.txt"
|
"bt8xx.txt"
|
||||||
contains detailed installation instructions for the
|
contains detailed installation instructions for the
|
||||||
various bt8xx based "budget" DVB cards
|
various bt8xx based "budget" DVB cards
|
||||||
(Nebula, Pinnacle PCTV, Twinhan DST)
|
(Nebula, Pinnacle PCTV, Twinhan DST)
|
||||||
|
|
|
@ -57,19 +57,19 @@ oldalloc This disables the Orlov block allocator and enables the
|
||||||
we'd like to get some feedback if it's the contrary for
|
we'd like to get some feedback if it's the contrary for
|
||||||
you.
|
you.
|
||||||
|
|
||||||
user_xattr (*) Enables POSIX Extended Attributes. It's enabled by
|
user_xattr Enables Extended User Attributes. Additionally, you need
|
||||||
default, however you need to confifure its support
|
to have extended attribute support enabled in the kernel
|
||||||
(CONFIG_EXT3_FS_XATTR). This is neccesary if you want
|
configuration (CONFIG_EXT3_FS_XATTR). See the attr(5)
|
||||||
to use POSIX Acces Control Lists support. You can visit
|
manual page and http://acl.bestbits.at to learn more
|
||||||
http://acl.bestbits.at to know more about POSIX Extended
|
about extended attributes.
|
||||||
attributes.
|
|
||||||
|
|
||||||
nouser_xattr Disables POSIX Extended Attributes.
|
nouser_xattr Disables Extended User Attributes.
|
||||||
|
|
||||||
acl (*) Enables POSIX Access Control Lists support. This is
|
acl Enables POSIX Access Control Lists support. Additionally,
|
||||||
enabled by default, however you need to configure
|
you need to have ACL support enabled in the kernel
|
||||||
its support (CONFIG_EXT3_FS_POSIX_ACL). If you want
|
configuration (CONFIG_EXT3_FS_POSIX_ACL). See the acl(5)
|
||||||
to know more about ACLs visit http://acl.bestbits.at
|
manual page and http://acl.bestbits.at for more
|
||||||
|
information.
|
||||||
|
|
||||||
noacl This option disables POSIX Access Control List support.
|
noacl This option disables POSIX Access Control List support.
|
||||||
|
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -408,7 +408,7 @@ outputmakefile:
|
||||||
# of make so .config is not included in this case either (for *config).
|
# of make so .config is not included in this case either (for *config).
|
||||||
|
|
||||||
no-dot-config-targets := clean mrproper distclean \
|
no-dot-config-targets := clean mrproper distclean \
|
||||||
cscope TAGS tags help %docs check% kernelrelease
|
cscope TAGS tags help %docs check%
|
||||||
|
|
||||||
config-targets := 0
|
config-targets := 0
|
||||||
mixed-targets := 0
|
mixed-targets := 0
|
||||||
|
|
|
@ -242,6 +242,15 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
|
||||||
*/
|
*/
|
||||||
long aluop1, aluop2, ccbit;
|
long aluop1, aluop2, ccbit;
|
||||||
|
|
||||||
|
if ((insn & 0x0fffffd0) == 0x012fff10) {
|
||||||
|
/*
|
||||||
|
* bx or blx
|
||||||
|
*/
|
||||||
|
alt = get_user_reg(child, insn & 15);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((insn & 0xf000) != 0xf000)
|
if ((insn & 0xf000) != 0xf000)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
|
||||||
*/
|
*/
|
||||||
save_previous_kprobe(kcb);
|
save_previous_kprobe(kcb);
|
||||||
set_current_kprobe(p, regs, kcb);
|
set_current_kprobe(p, regs, kcb);
|
||||||
p->nmissed++;
|
kprobes_inc_nmissed_count(p);
|
||||||
prepare_singlestep(p, regs);
|
prepare_singlestep(p, regs);
|
||||||
kcb->kprobe_status = KPROBE_REENTER;
|
kcb->kprobe_status = KPROBE_REENTER;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -1338,8 +1338,7 @@ int __cpu_disable(void)
|
||||||
if (cpu == 0)
|
if (cpu == 0)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
/* We enable the timer again on the exit path of the death loop */
|
clear_local_APIC();
|
||||||
disable_APIC_timer();
|
|
||||||
/* Allow any queued timer interrupts to get serviced */
|
/* Allow any queued timer interrupts to get serviced */
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
mdelay(1);
|
mdelay(1);
|
||||||
|
|
|
@ -650,13 +650,6 @@ fastcall void do_nmi(struct pt_regs * regs, long error_code)
|
||||||
|
|
||||||
cpu = smp_processor_id();
|
cpu = smp_processor_id();
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
|
||||||
if (!cpu_online(cpu)) {
|
|
||||||
nmi_exit();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
++nmi_count(cpu);
|
++nmi_count(cpu);
|
||||||
|
|
||||||
if (!rcu_dereference(nmi_callback)(regs, cpu))
|
if (!rcu_dereference(nmi_callback)(regs, cpu))
|
||||||
|
|
|
@ -223,9 +223,15 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ioremap_nocache);
|
EXPORT_SYMBOL(ioremap_nocache);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* iounmap - Free a IO remapping
|
||||||
|
* @addr: virtual address from ioremap_*
|
||||||
|
*
|
||||||
|
* Caller must ensure there is only one unmapping for the same pointer.
|
||||||
|
*/
|
||||||
void iounmap(volatile void __iomem *addr)
|
void iounmap(volatile void __iomem *addr)
|
||||||
{
|
{
|
||||||
struct vm_struct *p;
|
struct vm_struct *p, *o;
|
||||||
|
|
||||||
if ((void __force *)addr <= high_memory)
|
if ((void __force *)addr <= high_memory)
|
||||||
return;
|
return;
|
||||||
|
@ -239,22 +245,37 @@ void iounmap(volatile void __iomem *addr)
|
||||||
addr < phys_to_virt(ISA_END_ADDRESS))
|
addr < phys_to_virt(ISA_END_ADDRESS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
write_lock(&vmlist_lock);
|
addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr);
|
||||||
p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));
|
|
||||||
if (!p) {
|
/* Use the vm area unlocked, assuming the caller
|
||||||
printk(KERN_WARNING "iounmap: bad address %p\n", addr);
|
ensures there isn't another iounmap for the same address
|
||||||
|
in parallel. Reuse of the virtual address is prevented by
|
||||||
|
leaving it in the global lists until we're done with it.
|
||||||
|
cpa takes care of the direct mappings. */
|
||||||
|
read_lock(&vmlist_lock);
|
||||||
|
for (p = vmlist; p; p = p->next) {
|
||||||
|
if (p->addr == addr)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
read_unlock(&vmlist_lock);
|
||||||
|
|
||||||
|
if (!p) {
|
||||||
|
printk("iounmap: bad address %p\n", addr);
|
||||||
dump_stack();
|
dump_stack();
|
||||||
goto out_unlock;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Reset the direct mapping. Can block */
|
||||||
if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
|
if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
|
||||||
change_page_attr(virt_to_page(__va(p->phys_addr)),
|
change_page_attr(virt_to_page(__va(p->phys_addr)),
|
||||||
p->size >> PAGE_SHIFT,
|
p->size >> PAGE_SHIFT,
|
||||||
PAGE_KERNEL);
|
PAGE_KERNEL);
|
||||||
global_flush_tlb();
|
global_flush_tlb();
|
||||||
}
|
}
|
||||||
out_unlock:
|
|
||||||
write_unlock(&vmlist_lock);
|
/* Finally remove it */
|
||||||
|
o = remove_vm_area((void *)addr);
|
||||||
|
BUG_ON(p != o || o == NULL);
|
||||||
kfree(p);
|
kfree(p);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(iounmap);
|
EXPORT_SYMBOL(iounmap);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#define PCI_CONF1_ADDRESS(bus, devfn, reg) \
|
#define PCI_CONF1_ADDRESS(bus, devfn, reg) \
|
||||||
(0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3))
|
(0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3))
|
||||||
|
|
||||||
static int pci_conf1_read(unsigned int seg, unsigned int bus,
|
int pci_conf1_read(unsigned int seg, unsigned int bus,
|
||||||
unsigned int devfn, int reg, int len, u32 *value)
|
unsigned int devfn, int reg, int len, u32 *value)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -42,7 +42,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pci_conf1_write(unsigned int seg, unsigned int bus,
|
int pci_conf1_write(unsigned int seg, unsigned int bus,
|
||||||
unsigned int devfn, int reg, int len, u32 value)
|
unsigned int devfn, int reg, int len, u32 value)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
|
@ -19,21 +19,25 @@
|
||||||
/* The base address of the last MMCONFIG device accessed */
|
/* The base address of the last MMCONFIG device accessed */
|
||||||
static u32 mmcfg_last_accessed_device;
|
static u32 mmcfg_last_accessed_device;
|
||||||
|
|
||||||
|
static DECLARE_BITMAP(fallback_slots, 32);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Functions for accessing PCI configuration space with MMCONFIG accesses
|
* Functions for accessing PCI configuration space with MMCONFIG accesses
|
||||||
*/
|
*/
|
||||||
static u32 get_base_addr(unsigned int seg, int bus)
|
static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
|
||||||
{
|
{
|
||||||
int cfg_num = -1;
|
int cfg_num = -1;
|
||||||
struct acpi_table_mcfg_config *cfg;
|
struct acpi_table_mcfg_config *cfg;
|
||||||
|
|
||||||
|
if (seg == 0 && bus == 0 &&
|
||||||
|
test_bit(PCI_SLOT(devfn), fallback_slots))
|
||||||
|
return 0;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
++cfg_num;
|
++cfg_num;
|
||||||
if (cfg_num >= pci_mmcfg_config_num) {
|
if (cfg_num >= pci_mmcfg_config_num) {
|
||||||
/* something bad is going on, no cfg table is found. */
|
/* Not found - fallback to type 1 */
|
||||||
/* so we fall back to the old way we used to do this */
|
return 0;
|
||||||
/* and just rely on the first entry to be correct. */
|
|
||||||
return pci_mmcfg_config[0].base_address;
|
|
||||||
}
|
}
|
||||||
cfg = &pci_mmcfg_config[cfg_num];
|
cfg = &pci_mmcfg_config[cfg_num];
|
||||||
if (cfg->pci_segment_group_number != seg)
|
if (cfg->pci_segment_group_number != seg)
|
||||||
|
@ -44,9 +48,9 @@ static u32 get_base_addr(unsigned int seg, int bus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void pci_exp_set_dev_base(unsigned int seg, int bus, int devfn)
|
static inline void pci_exp_set_dev_base(unsigned int base, int bus, int devfn)
|
||||||
{
|
{
|
||||||
u32 dev_base = get_base_addr(seg, bus) | (bus << 20) | (devfn << 12);
|
u32 dev_base = base | (bus << 20) | (devfn << 12);
|
||||||
if (dev_base != mmcfg_last_accessed_device) {
|
if (dev_base != mmcfg_last_accessed_device) {
|
||||||
mmcfg_last_accessed_device = dev_base;
|
mmcfg_last_accessed_device = dev_base;
|
||||||
set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);
|
set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);
|
||||||
|
@ -57,13 +61,18 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
|
||||||
unsigned int devfn, int reg, int len, u32 *value)
|
unsigned int devfn, int reg, int len, u32 *value)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
u32 base;
|
||||||
|
|
||||||
if (!value || (bus > 255) || (devfn > 255) || (reg > 4095))
|
if (!value || (bus > 255) || (devfn > 255) || (reg > 4095))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
base = get_base_addr(seg, bus, devfn);
|
||||||
|
if (!base)
|
||||||
|
return pci_conf1_read(seg,bus,devfn,reg,len,value);
|
||||||
|
|
||||||
spin_lock_irqsave(&pci_config_lock, flags);
|
spin_lock_irqsave(&pci_config_lock, flags);
|
||||||
|
|
||||||
pci_exp_set_dev_base(seg, bus, devfn);
|
pci_exp_set_dev_base(base, bus, devfn);
|
||||||
|
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -86,13 +95,18 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
|
||||||
unsigned int devfn, int reg, int len, u32 value)
|
unsigned int devfn, int reg, int len, u32 value)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
u32 base;
|
||||||
|
|
||||||
if ((bus > 255) || (devfn > 255) || (reg > 4095))
|
if ((bus > 255) || (devfn > 255) || (reg > 4095))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
base = get_base_addr(seg, bus, devfn);
|
||||||
|
if (!base)
|
||||||
|
return pci_conf1_write(seg,bus,devfn,reg,len,value);
|
||||||
|
|
||||||
spin_lock_irqsave(&pci_config_lock, flags);
|
spin_lock_irqsave(&pci_config_lock, flags);
|
||||||
|
|
||||||
pci_exp_set_dev_base(seg, bus, devfn);
|
pci_exp_set_dev_base(base, bus, devfn);
|
||||||
|
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -116,6 +130,37 @@ static struct pci_raw_ops pci_mmcfg = {
|
||||||
.write = pci_mmcfg_write,
|
.write = pci_mmcfg_write,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* K8 systems have some devices (typically in the builtin northbridge)
|
||||||
|
that are only accessible using type1
|
||||||
|
Normally this can be expressed in the MCFG by not listing them
|
||||||
|
and assigning suitable _SEGs, but this isn't implemented in some BIOS.
|
||||||
|
Instead try to discover all devices on bus 0 that are unreachable using MM
|
||||||
|
and fallback for them.
|
||||||
|
We only do this for bus 0/seg 0 */
|
||||||
|
static __init void unreachable_devices(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
for (i = 0; i < 32; i++) {
|
||||||
|
u32 val1;
|
||||||
|
u32 addr;
|
||||||
|
|
||||||
|
pci_conf1_read(0, 0, PCI_DEVFN(i, 0), 0, 4, &val1);
|
||||||
|
if (val1 == 0xffffffff)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* Locking probably not needed, but safer */
|
||||||
|
spin_lock_irqsave(&pci_config_lock, flags);
|
||||||
|
addr = get_base_addr(0, 0, PCI_DEVFN(i, 0));
|
||||||
|
if (addr != 0)
|
||||||
|
pci_exp_set_dev_base(addr, 0, PCI_DEVFN(i, 0));
|
||||||
|
if (addr == 0 || readl((u32 *)addr) != val1)
|
||||||
|
set_bit(i, fallback_slots);
|
||||||
|
spin_unlock_irqrestore(&pci_config_lock, flags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int __init pci_mmcfg_init(void)
|
static int __init pci_mmcfg_init(void)
|
||||||
{
|
{
|
||||||
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
|
if ((pci_probe & PCI_PROBE_MMCONF) == 0)
|
||||||
|
@ -131,6 +176,8 @@ static int __init pci_mmcfg_init(void)
|
||||||
raw_pci_ops = &pci_mmcfg;
|
raw_pci_ops = &pci_mmcfg;
|
||||||
pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
|
pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
|
||||||
|
|
||||||
|
unreachable_devices();
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,3 +74,10 @@ extern spinlock_t pci_config_lock;
|
||||||
|
|
||||||
extern int (*pcibios_enable_irq)(struct pci_dev *dev);
|
extern int (*pcibios_enable_irq)(struct pci_dev *dev);
|
||||||
extern void (*pcibios_disable_irq)(struct pci_dev *dev);
|
extern void (*pcibios_disable_irq)(struct pci_dev *dev);
|
||||||
|
|
||||||
|
extern int pci_conf1_write(unsigned int seg, unsigned int bus,
|
||||||
|
unsigned int devfn, int reg, int len, u32 value);
|
||||||
|
extern int pci_conf1_read(unsigned int seg, unsigned int bus,
|
||||||
|
unsigned int devfn, int reg, int len, u32 *value);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ config IA64_UNCACHED_ALLOCATOR
|
||||||
bool
|
bool
|
||||||
select GENERIC_ALLOCATOR
|
select GENERIC_ALLOCATOR
|
||||||
|
|
||||||
config ZONE_DMA_IS_DMA32
|
config DMA_IS_DMA32
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# Linux kernel version: 2.6.13-rc6
|
# Linux kernel version: 2.6.15-rc4
|
||||||
# Tue Aug 16 14:40:41 2005
|
# Fri Dec 2 10:33:48 2005
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -16,6 +16,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||||
# General setup
|
# General setup
|
||||||
#
|
#
|
||||||
CONFIG_LOCALVERSION=""
|
CONFIG_LOCALVERSION=""
|
||||||
|
# CONFIG_LOCALVERSION_AUTO is not set
|
||||||
CONFIG_SWAP=y
|
CONFIG_SWAP=y
|
||||||
CONFIG_SYSVIPC=y
|
CONFIG_SYSVIPC=y
|
||||||
CONFIG_POSIX_MQUEUE=y
|
CONFIG_POSIX_MQUEUE=y
|
||||||
|
@ -26,6 +27,7 @@ CONFIG_HOTPLUG=y
|
||||||
CONFIG_KOBJECT_UEVENT=y
|
CONFIG_KOBJECT_UEVENT=y
|
||||||
# CONFIG_IKCONFIG is not set
|
# CONFIG_IKCONFIG is not set
|
||||||
CONFIG_CPUSETS=y
|
CONFIG_CPUSETS=y
|
||||||
|
CONFIG_INITRAMFS_SOURCE=""
|
||||||
# CONFIG_EMBEDDED is not set
|
# CONFIG_EMBEDDED is not set
|
||||||
CONFIG_KALLSYMS=y
|
CONFIG_KALLSYMS=y
|
||||||
CONFIG_KALLSYMS_ALL=y
|
CONFIG_KALLSYMS_ALL=y
|
||||||
|
@ -55,12 +57,30 @@ CONFIG_OBSOLETE_MODPARM=y
|
||||||
CONFIG_KMOD=y
|
CONFIG_KMOD=y
|
||||||
CONFIG_STOP_MACHINE=y
|
CONFIG_STOP_MACHINE=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Block layer
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# IO Schedulers
|
||||||
|
#
|
||||||
|
CONFIG_IOSCHED_NOOP=y
|
||||||
|
CONFIG_IOSCHED_AS=y
|
||||||
|
CONFIG_IOSCHED_DEADLINE=y
|
||||||
|
CONFIG_IOSCHED_CFQ=y
|
||||||
|
CONFIG_DEFAULT_AS=y
|
||||||
|
# CONFIG_DEFAULT_DEADLINE is not set
|
||||||
|
# CONFIG_DEFAULT_CFQ is not set
|
||||||
|
# CONFIG_DEFAULT_NOOP is not set
|
||||||
|
CONFIG_DEFAULT_IOSCHED="anticipatory"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Processor type and features
|
# Processor type and features
|
||||||
#
|
#
|
||||||
CONFIG_IA64=y
|
CONFIG_IA64=y
|
||||||
CONFIG_64BIT=y
|
CONFIG_64BIT=y
|
||||||
CONFIG_MMU=y
|
CONFIG_MMU=y
|
||||||
|
CONFIG_SWIOTLB=y
|
||||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||||
CONFIG_TIME_INTERPOLATION=y
|
CONFIG_TIME_INTERPOLATION=y
|
||||||
|
@ -68,6 +88,7 @@ CONFIG_EFI=y
|
||||||
CONFIG_GENERIC_IOMAP=y
|
CONFIG_GENERIC_IOMAP=y
|
||||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||||
CONFIG_IA64_UNCACHED_ALLOCATOR=y
|
CONFIG_IA64_UNCACHED_ALLOCATOR=y
|
||||||
|
CONFIG_ZONE_DMA_IS_DMA32=y
|
||||||
# CONFIG_IA64_GENERIC is not set
|
# CONFIG_IA64_GENERIC is not set
|
||||||
# CONFIG_IA64_DIG is not set
|
# CONFIG_IA64_DIG is not set
|
||||||
# CONFIG_IA64_HP_ZX1 is not set
|
# CONFIG_IA64_HP_ZX1 is not set
|
||||||
|
@ -87,14 +108,10 @@ CONFIG_HZ_250=y
|
||||||
# CONFIG_HZ_1000 is not set
|
# CONFIG_HZ_1000 is not set
|
||||||
CONFIG_HZ=250
|
CONFIG_HZ=250
|
||||||
CONFIG_IA64_L1_CACHE_SHIFT=7
|
CONFIG_IA64_L1_CACHE_SHIFT=7
|
||||||
CONFIG_NUMA=y
|
|
||||||
CONFIG_VIRTUAL_MEM_MAP=y
|
|
||||||
CONFIG_HOLES_IN_ZONE=y
|
|
||||||
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
|
|
||||||
# CONFIG_IA64_CYCLONE is not set
|
# CONFIG_IA64_CYCLONE is not set
|
||||||
CONFIG_IOSAPIC=y
|
CONFIG_IOSAPIC=y
|
||||||
CONFIG_IA64_SGI_SN_XP=m
|
CONFIG_IA64_SGI_SN_XP=m
|
||||||
CONFIG_FORCE_MAX_ZONEORDER=18
|
CONFIG_FORCE_MAX_ZONEORDER=17
|
||||||
CONFIG_SMP=y
|
CONFIG_SMP=y
|
||||||
CONFIG_NR_CPUS=512
|
CONFIG_NR_CPUS=512
|
||||||
# CONFIG_HOTPLUG_CPU is not set
|
# CONFIG_HOTPLUG_CPU is not set
|
||||||
|
@ -107,7 +124,17 @@ CONFIG_DISCONTIGMEM_MANUAL=y
|
||||||
CONFIG_DISCONTIGMEM=y
|
CONFIG_DISCONTIGMEM=y
|
||||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||||
CONFIG_NEED_MULTIPLE_NODES=y
|
CONFIG_NEED_MULTIPLE_NODES=y
|
||||||
CONFIG_HAVE_DEC_LOCK=y
|
# CONFIG_SPARSEMEM_STATIC is not set
|
||||||
|
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||||
|
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||||
|
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
|
||||||
|
CONFIG_ARCH_FLATMEM_ENABLE=y
|
||||||
|
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||||
|
CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
|
||||||
|
CONFIG_NUMA=y
|
||||||
|
CONFIG_VIRTUAL_MEM_MAP=y
|
||||||
|
CONFIG_HOLES_IN_ZONE=y
|
||||||
|
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
|
||||||
CONFIG_IA32_SUPPORT=y
|
CONFIG_IA32_SUPPORT=y
|
||||||
CONFIG_COMPAT=y
|
CONFIG_COMPAT=y
|
||||||
CONFIG_IA64_MCA_RECOVERY=y
|
CONFIG_IA64_MCA_RECOVERY=y
|
||||||
|
@ -126,20 +153,28 @@ CONFIG_BINFMT_ELF=y
|
||||||
# Power management and ACPI
|
# Power management and ACPI
|
||||||
#
|
#
|
||||||
CONFIG_PM=y
|
CONFIG_PM=y
|
||||||
CONFIG_ACPI=y
|
# CONFIG_PM_LEGACY is not set
|
||||||
|
# CONFIG_PM_DEBUG is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# ACPI (Advanced Configuration and Power Interface) Support
|
# ACPI (Advanced Configuration and Power Interface) Support
|
||||||
#
|
#
|
||||||
|
CONFIG_ACPI=y
|
||||||
# CONFIG_ACPI_BUTTON is not set
|
# CONFIG_ACPI_BUTTON is not set
|
||||||
# CONFIG_ACPI_FAN is not set
|
# CONFIG_ACPI_FAN is not set
|
||||||
# CONFIG_ACPI_PROCESSOR is not set
|
# CONFIG_ACPI_PROCESSOR is not set
|
||||||
CONFIG_ACPI_NUMA=y
|
CONFIG_ACPI_NUMA=y
|
||||||
|
CONFIG_ACPI_BLACKLIST_YEAR=0
|
||||||
# CONFIG_ACPI_DEBUG is not set
|
# CONFIG_ACPI_DEBUG is not set
|
||||||
CONFIG_ACPI_POWER=y
|
CONFIG_ACPI_POWER=y
|
||||||
CONFIG_ACPI_SYSTEM=y
|
CONFIG_ACPI_SYSTEM=y
|
||||||
# CONFIG_ACPI_CONTAINER is not set
|
# CONFIG_ACPI_CONTAINER is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# CPU Frequency scaling
|
||||||
|
#
|
||||||
|
# CONFIG_CPU_FREQ is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bus options (PCI, PCMCIA)
|
# Bus options (PCI, PCMCIA)
|
||||||
#
|
#
|
||||||
|
@ -147,7 +182,6 @@ CONFIG_PCI=y
|
||||||
CONFIG_PCI_DOMAINS=y
|
CONFIG_PCI_DOMAINS=y
|
||||||
# CONFIG_PCI_MSI is not set
|
# CONFIG_PCI_MSI is not set
|
||||||
CONFIG_PCI_LEGACY_PROC=y
|
CONFIG_PCI_LEGACY_PROC=y
|
||||||
CONFIG_PCI_NAMES=y
|
|
||||||
# CONFIG_PCI_DEBUG is not set
|
# CONFIG_PCI_DEBUG is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -191,8 +225,8 @@ CONFIG_SYN_COOKIES=y
|
||||||
# CONFIG_INET_ESP is not set
|
# CONFIG_INET_ESP is not set
|
||||||
# CONFIG_INET_IPCOMP is not set
|
# CONFIG_INET_IPCOMP is not set
|
||||||
# CONFIG_INET_TUNNEL is not set
|
# CONFIG_INET_TUNNEL is not set
|
||||||
CONFIG_IP_TCPDIAG=y
|
CONFIG_INET_DIAG=m
|
||||||
# CONFIG_IP_TCPDIAG_IPV6 is not set
|
CONFIG_INET_TCP_DIAG=m
|
||||||
# CONFIG_TCP_CONG_ADVANCED is not set
|
# CONFIG_TCP_CONG_ADVANCED is not set
|
||||||
CONFIG_TCP_CONG_BIC=y
|
CONFIG_TCP_CONG_BIC=y
|
||||||
CONFIG_IPV6=m
|
CONFIG_IPV6=m
|
||||||
|
@ -204,6 +238,11 @@ CONFIG_IPV6=m
|
||||||
# CONFIG_IPV6_TUNNEL is not set
|
# CONFIG_IPV6_TUNNEL is not set
|
||||||
# CONFIG_NETFILTER is not set
|
# CONFIG_NETFILTER is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# DCCP Configuration (EXPERIMENTAL)
|
||||||
|
#
|
||||||
|
# CONFIG_IP_DCCP is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# SCTP Configuration (EXPERIMENTAL)
|
# SCTP Configuration (EXPERIMENTAL)
|
||||||
#
|
#
|
||||||
|
@ -220,8 +259,11 @@ CONFIG_IPV6=m
|
||||||
# CONFIG_NET_DIVERT is not set
|
# CONFIG_NET_DIVERT is not set
|
||||||
# CONFIG_ECONET is not set
|
# CONFIG_ECONET is not set
|
||||||
# CONFIG_WAN_ROUTER is not set
|
# CONFIG_WAN_ROUTER is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# QoS and/or fair queueing
|
||||||
|
#
|
||||||
# CONFIG_NET_SCHED is not set
|
# CONFIG_NET_SCHED is not set
|
||||||
# CONFIG_NET_CLS_ROUTE is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Network testing
|
# Network testing
|
||||||
|
@ -230,6 +272,7 @@ CONFIG_IPV6=m
|
||||||
# CONFIG_HAMRADIO is not set
|
# CONFIG_HAMRADIO is not set
|
||||||
# CONFIG_IRDA is not set
|
# CONFIG_IRDA is not set
|
||||||
# CONFIG_BT is not set
|
# CONFIG_BT is not set
|
||||||
|
# CONFIG_IEEE80211 is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Device Drivers
|
# Device Drivers
|
||||||
|
@ -243,6 +286,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||||
CONFIG_FW_LOADER=y
|
CONFIG_FW_LOADER=y
|
||||||
# CONFIG_DEBUG_DRIVER is not set
|
# CONFIG_DEBUG_DRIVER is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Connector - unified userspace <-> kernelspace linker
|
||||||
|
#
|
||||||
|
# CONFIG_CONNECTOR is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Memory Technology Devices (MTD)
|
# Memory Technology Devices (MTD)
|
||||||
#
|
#
|
||||||
|
@ -275,16 +323,7 @@ CONFIG_BLK_DEV_RAM=y
|
||||||
CONFIG_BLK_DEV_RAM_COUNT=16
|
CONFIG_BLK_DEV_RAM_COUNT=16
|
||||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||||
CONFIG_BLK_DEV_INITRD=y
|
CONFIG_BLK_DEV_INITRD=y
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
|
||||||
# CONFIG_CDROM_PKTCDVD is not set
|
# CONFIG_CDROM_PKTCDVD is not set
|
||||||
|
|
||||||
#
|
|
||||||
# IO Schedulers
|
|
||||||
#
|
|
||||||
CONFIG_IOSCHED_NOOP=y
|
|
||||||
CONFIG_IOSCHED_AS=y
|
|
||||||
CONFIG_IOSCHED_DEADLINE=y
|
|
||||||
CONFIG_IOSCHED_CFQ=y
|
|
||||||
CONFIG_ATA_OVER_ETH=m
|
CONFIG_ATA_OVER_ETH=m
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -349,6 +388,7 @@ CONFIG_IDEDMA_AUTO=y
|
||||||
#
|
#
|
||||||
# SCSI device support
|
# SCSI device support
|
||||||
#
|
#
|
||||||
|
# CONFIG_RAID_ATTRS is not set
|
||||||
CONFIG_SCSI=y
|
CONFIG_SCSI=y
|
||||||
CONFIG_SCSI_PROC_FS=y
|
CONFIG_SCSI_PROC_FS=y
|
||||||
|
|
||||||
|
@ -375,11 +415,13 @@ CONFIG_SCSI_CONSTANTS=y
|
||||||
#
|
#
|
||||||
CONFIG_SCSI_SPI_ATTRS=y
|
CONFIG_SCSI_SPI_ATTRS=y
|
||||||
CONFIG_SCSI_FC_ATTRS=y
|
CONFIG_SCSI_FC_ATTRS=y
|
||||||
# CONFIG_SCSI_ISCSI_ATTRS is not set
|
CONFIG_SCSI_ISCSI_ATTRS=m
|
||||||
|
CONFIG_SCSI_SAS_ATTRS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# SCSI low-level drivers
|
# SCSI low-level drivers
|
||||||
#
|
#
|
||||||
|
CONFIG_ISCSI_TCP=m
|
||||||
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
|
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
|
||||||
# CONFIG_SCSI_3W_9XXX is not set
|
# CONFIG_SCSI_3W_9XXX is not set
|
||||||
# CONFIG_SCSI_ACARD is not set
|
# CONFIG_SCSI_ACARD is not set
|
||||||
|
@ -389,15 +431,19 @@ CONFIG_SCSI_FC_ATTRS=y
|
||||||
# CONFIG_SCSI_AIC79XX is not set
|
# CONFIG_SCSI_AIC79XX is not set
|
||||||
# CONFIG_MEGARAID_NEWGEN is not set
|
# CONFIG_MEGARAID_NEWGEN is not set
|
||||||
# CONFIG_MEGARAID_LEGACY is not set
|
# CONFIG_MEGARAID_LEGACY is not set
|
||||||
|
# CONFIG_MEGARAID_SAS is not set
|
||||||
CONFIG_SCSI_SATA=y
|
CONFIG_SCSI_SATA=y
|
||||||
# CONFIG_SCSI_SATA_AHCI is not set
|
# CONFIG_SCSI_SATA_AHCI is not set
|
||||||
# CONFIG_SCSI_SATA_SVW is not set
|
# CONFIG_SCSI_SATA_SVW is not set
|
||||||
# CONFIG_SCSI_ATA_PIIX is not set
|
# CONFIG_SCSI_ATA_PIIX is not set
|
||||||
|
# CONFIG_SCSI_SATA_MV is not set
|
||||||
# CONFIG_SCSI_SATA_NV is not set
|
# CONFIG_SCSI_SATA_NV is not set
|
||||||
# CONFIG_SCSI_SATA_PROMISE is not set
|
# CONFIG_SCSI_PDC_ADMA is not set
|
||||||
# CONFIG_SCSI_SATA_QSTOR is not set
|
# CONFIG_SCSI_SATA_QSTOR is not set
|
||||||
|
# CONFIG_SCSI_SATA_PROMISE is not set
|
||||||
# CONFIG_SCSI_SATA_SX4 is not set
|
# CONFIG_SCSI_SATA_SX4 is not set
|
||||||
# CONFIG_SCSI_SATA_SIL is not set
|
# CONFIG_SCSI_SATA_SIL is not set
|
||||||
|
# CONFIG_SCSI_SATA_SIL24 is not set
|
||||||
# CONFIG_SCSI_SATA_SIS is not set
|
# CONFIG_SCSI_SATA_SIS is not set
|
||||||
# CONFIG_SCSI_SATA_ULI is not set
|
# CONFIG_SCSI_SATA_ULI is not set
|
||||||
# CONFIG_SCSI_SATA_VIA is not set
|
# CONFIG_SCSI_SATA_VIA is not set
|
||||||
|
@ -411,7 +457,6 @@ CONFIG_SCSI_SATA_VITESSE=y
|
||||||
# CONFIG_SCSI_IPR is not set
|
# CONFIG_SCSI_IPR is not set
|
||||||
# CONFIG_SCSI_QLOGIC_FC is not set
|
# CONFIG_SCSI_QLOGIC_FC is not set
|
||||||
CONFIG_SCSI_QLOGIC_1280=y
|
CONFIG_SCSI_QLOGIC_1280=y
|
||||||
# CONFIG_SCSI_QLOGIC_1280_1040 is not set
|
|
||||||
CONFIG_SCSI_QLA2XXX=y
|
CONFIG_SCSI_QLA2XXX=y
|
||||||
# CONFIG_SCSI_QLA21XX is not set
|
# CONFIG_SCSI_QLA21XX is not set
|
||||||
CONFIG_SCSI_QLA22XX=y
|
CONFIG_SCSI_QLA22XX=y
|
||||||
|
@ -451,6 +496,7 @@ CONFIG_DM_MULTIPATH_EMC=m
|
||||||
CONFIG_FUSION=y
|
CONFIG_FUSION=y
|
||||||
CONFIG_FUSION_SPI=y
|
CONFIG_FUSION_SPI=y
|
||||||
CONFIG_FUSION_FC=y
|
CONFIG_FUSION_FC=y
|
||||||
|
CONFIG_FUSION_SAS=y
|
||||||
CONFIG_FUSION_MAX_SGE=128
|
CONFIG_FUSION_MAX_SGE=128
|
||||||
CONFIG_FUSION_CTL=m
|
CONFIG_FUSION_CTL=m
|
||||||
|
|
||||||
|
@ -478,6 +524,10 @@ CONFIG_NETDEVICES=y
|
||||||
#
|
#
|
||||||
# CONFIG_ARCNET is not set
|
# CONFIG_ARCNET is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# PHY device support
|
||||||
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# Ethernet (10 or 100Mbit)
|
# Ethernet (10 or 100Mbit)
|
||||||
#
|
#
|
||||||
|
@ -493,6 +543,7 @@ CONFIG_NETDEVICES=y
|
||||||
# CONFIG_HAMACHI is not set
|
# CONFIG_HAMACHI is not set
|
||||||
# CONFIG_YELLOWFIN is not set
|
# CONFIG_YELLOWFIN is not set
|
||||||
# CONFIG_R8169 is not set
|
# CONFIG_R8169 is not set
|
||||||
|
# CONFIG_SIS190 is not set
|
||||||
# CONFIG_SKGE is not set
|
# CONFIG_SKGE is not set
|
||||||
# CONFIG_SK98LIN is not set
|
# CONFIG_SK98LIN is not set
|
||||||
CONFIG_TIGON3=y
|
CONFIG_TIGON3=y
|
||||||
|
@ -501,10 +552,10 @@ CONFIG_TIGON3=y
|
||||||
#
|
#
|
||||||
# Ethernet (10000 Mbit)
|
# Ethernet (10000 Mbit)
|
||||||
#
|
#
|
||||||
|
CONFIG_CHELSIO_T1=m
|
||||||
# CONFIG_IXGB is not set
|
# CONFIG_IXGB is not set
|
||||||
CONFIG_S2IO=m
|
CONFIG_S2IO=m
|
||||||
# CONFIG_S2IO_NAPI is not set
|
# CONFIG_S2IO_NAPI is not set
|
||||||
# CONFIG_2BUFF_MODE is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Token Ring devices
|
# Token Ring devices
|
||||||
|
@ -583,6 +634,7 @@ CONFIG_HW_CONSOLE=y
|
||||||
CONFIG_SERIAL_NONSTANDARD=y
|
CONFIG_SERIAL_NONSTANDARD=y
|
||||||
# CONFIG_ROCKETPORT is not set
|
# CONFIG_ROCKETPORT is not set
|
||||||
# CONFIG_CYCLADES is not set
|
# CONFIG_CYCLADES is not set
|
||||||
|
# CONFIG_DIGIEPCA is not set
|
||||||
# CONFIG_MOXA_SMARTIO is not set
|
# CONFIG_MOXA_SMARTIO is not set
|
||||||
# CONFIG_ISI is not set
|
# CONFIG_ISI is not set
|
||||||
# CONFIG_SYNCLINKMP is not set
|
# CONFIG_SYNCLINKMP is not set
|
||||||
|
@ -629,7 +681,8 @@ CONFIG_EFI_RTC=y
|
||||||
#
|
#
|
||||||
# Ftape, the floppy tape device driver
|
# Ftape, the floppy tape device driver
|
||||||
#
|
#
|
||||||
# CONFIG_AGP is not set
|
CONFIG_AGP=y
|
||||||
|
CONFIG_AGP_SGI_TIOCA=y
|
||||||
# CONFIG_DRM is not set
|
# CONFIG_DRM is not set
|
||||||
CONFIG_RAW_DRIVER=m
|
CONFIG_RAW_DRIVER=m
|
||||||
# CONFIG_HPET is not set
|
# CONFIG_HPET is not set
|
||||||
|
@ -641,12 +694,12 @@ CONFIG_MMTIMER=y
|
||||||
# TPM devices
|
# TPM devices
|
||||||
#
|
#
|
||||||
# CONFIG_TCG_TPM is not set
|
# CONFIG_TCG_TPM is not set
|
||||||
|
# CONFIG_TELCLOCK is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# I2C support
|
# I2C support
|
||||||
#
|
#
|
||||||
# CONFIG_I2C is not set
|
# CONFIG_I2C is not set
|
||||||
# CONFIG_I2C_SENSOR is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dallas's 1-wire bus
|
# Dallas's 1-wire bus
|
||||||
|
@ -657,11 +710,16 @@ CONFIG_MMTIMER=y
|
||||||
# Hardware Monitoring support
|
# Hardware Monitoring support
|
||||||
#
|
#
|
||||||
# CONFIG_HWMON is not set
|
# CONFIG_HWMON is not set
|
||||||
|
# CONFIG_HWMON_VID is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Misc devices
|
# Misc devices
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Multimedia Capabilities Port drivers
|
||||||
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# Multimedia devices
|
# Multimedia devices
|
||||||
#
|
#
|
||||||
|
@ -721,12 +779,15 @@ CONFIG_USB_UHCI_HCD=m
|
||||||
#
|
#
|
||||||
# USB Device Class drivers
|
# USB Device Class drivers
|
||||||
#
|
#
|
||||||
# CONFIG_USB_BLUETOOTH_TTY is not set
|
|
||||||
# CONFIG_USB_ACM is not set
|
# CONFIG_USB_ACM is not set
|
||||||
# CONFIG_USB_PRINTER is not set
|
# CONFIG_USB_PRINTER is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
|
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# may also be needed; see USB_STORAGE Help for more information
|
||||||
#
|
#
|
||||||
# CONFIG_USB_STORAGE is not set
|
# CONFIG_USB_STORAGE is not set
|
||||||
|
|
||||||
|
@ -751,9 +812,11 @@ CONFIG_USB_HIDINPUT=y
|
||||||
# CONFIG_USB_MTOUCH is not set
|
# CONFIG_USB_MTOUCH is not set
|
||||||
# CONFIG_USB_ITMTOUCH is not set
|
# CONFIG_USB_ITMTOUCH is not set
|
||||||
# CONFIG_USB_EGALAX is not set
|
# CONFIG_USB_EGALAX is not set
|
||||||
|
# CONFIG_USB_YEALINK is not set
|
||||||
# CONFIG_USB_XPAD is not set
|
# CONFIG_USB_XPAD is not set
|
||||||
# CONFIG_USB_ATI_REMOTE is not set
|
# CONFIG_USB_ATI_REMOTE is not set
|
||||||
# CONFIG_USB_KEYSPAN_REMOTE is not set
|
# CONFIG_USB_KEYSPAN_REMOTE is not set
|
||||||
|
# CONFIG_USB_APPLETOUCH is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# USB Imaging devices
|
# USB Imaging devices
|
||||||
|
@ -824,11 +887,13 @@ CONFIG_USB_MON=y
|
||||||
# InfiniBand support
|
# InfiniBand support
|
||||||
#
|
#
|
||||||
CONFIG_INFINIBAND=m
|
CONFIG_INFINIBAND=m
|
||||||
CONFIG_INFINIBAND_USER_VERBS=m
|
# CONFIG_INFINIBAND_USER_MAD is not set
|
||||||
|
CONFIG_INFINIBAND_USER_ACCESS=m
|
||||||
CONFIG_INFINIBAND_MTHCA=m
|
CONFIG_INFINIBAND_MTHCA=m
|
||||||
# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
|
# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
|
||||||
CONFIG_INFINIBAND_IPOIB=m
|
CONFIG_INFINIBAND_IPOIB=m
|
||||||
# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
|
# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
|
||||||
|
CONFIG_INFINIBAND_SRP=m
|
||||||
|
|
||||||
#
|
#
|
||||||
# SN Devices
|
# SN Devices
|
||||||
|
@ -858,16 +923,12 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
|
||||||
CONFIG_REISERFS_FS_SECURITY=y
|
CONFIG_REISERFS_FS_SECURITY=y
|
||||||
# CONFIG_JFS_FS is not set
|
# CONFIG_JFS_FS is not set
|
||||||
CONFIG_FS_POSIX_ACL=y
|
CONFIG_FS_POSIX_ACL=y
|
||||||
|
|
||||||
#
|
|
||||||
# XFS support
|
|
||||||
#
|
|
||||||
CONFIG_XFS_FS=y
|
CONFIG_XFS_FS=y
|
||||||
CONFIG_XFS_EXPORT=y
|
CONFIG_XFS_EXPORT=y
|
||||||
CONFIG_XFS_RT=y
|
|
||||||
CONFIG_XFS_QUOTA=y
|
CONFIG_XFS_QUOTA=y
|
||||||
# CONFIG_XFS_SECURITY is not set
|
# CONFIG_XFS_SECURITY is not set
|
||||||
CONFIG_XFS_POSIX_ACL=y
|
CONFIG_XFS_POSIX_ACL=y
|
||||||
|
CONFIG_XFS_RT=y
|
||||||
# CONFIG_MINIX_FS is not set
|
# CONFIG_MINIX_FS is not set
|
||||||
# CONFIG_ROMFS_FS is not set
|
# CONFIG_ROMFS_FS is not set
|
||||||
CONFIG_INOTIFY=y
|
CONFIG_INOTIFY=y
|
||||||
|
@ -878,6 +939,7 @@ CONFIG_QUOTACTL=y
|
||||||
CONFIG_DNOTIFY=y
|
CONFIG_DNOTIFY=y
|
||||||
CONFIG_AUTOFS_FS=m
|
CONFIG_AUTOFS_FS=m
|
||||||
CONFIG_AUTOFS4_FS=m
|
CONFIG_AUTOFS4_FS=m
|
||||||
|
CONFIG_FUSE_FS=m
|
||||||
|
|
||||||
#
|
#
|
||||||
# CD-ROM/DVD Filesystems
|
# CD-ROM/DVD Filesystems
|
||||||
|
@ -904,13 +966,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
|
||||||
CONFIG_PROC_FS=y
|
CONFIG_PROC_FS=y
|
||||||
CONFIG_PROC_KCORE=y
|
CONFIG_PROC_KCORE=y
|
||||||
CONFIG_SYSFS=y
|
CONFIG_SYSFS=y
|
||||||
# CONFIG_DEVPTS_FS_XATTR is not set
|
|
||||||
CONFIG_TMPFS=y
|
CONFIG_TMPFS=y
|
||||||
CONFIG_TMPFS_XATTR=y
|
|
||||||
CONFIG_TMPFS_SECURITY=y
|
|
||||||
CONFIG_HUGETLBFS=y
|
CONFIG_HUGETLBFS=y
|
||||||
CONFIG_HUGETLB_PAGE=y
|
CONFIG_HUGETLB_PAGE=y
|
||||||
CONFIG_RAMFS=y
|
CONFIG_RAMFS=y
|
||||||
|
CONFIG_RELAYFS_FS=m
|
||||||
|
|
||||||
#
|
#
|
||||||
# Miscellaneous filesystems
|
# Miscellaneous filesystems
|
||||||
|
@ -959,6 +1019,7 @@ CONFIG_CIFS=m
|
||||||
# CONFIG_NCP_FS is not set
|
# CONFIG_NCP_FS is not set
|
||||||
# CONFIG_CODA_FS is not set
|
# CONFIG_CODA_FS is not set
|
||||||
# CONFIG_AFS_FS is not set
|
# CONFIG_AFS_FS is not set
|
||||||
|
# CONFIG_9P_FS is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Partition Types
|
# Partition Types
|
||||||
|
@ -1028,18 +1089,21 @@ CONFIG_NLS_UTF8=y
|
||||||
# Library routines
|
# Library routines
|
||||||
#
|
#
|
||||||
# CONFIG_CRC_CCITT is not set
|
# CONFIG_CRC_CCITT is not set
|
||||||
|
CONFIG_CRC16=m
|
||||||
CONFIG_CRC32=y
|
CONFIG_CRC32=y
|
||||||
# CONFIG_LIBCRC32C is not set
|
CONFIG_LIBCRC32C=m
|
||||||
CONFIG_ZLIB_INFLATE=m
|
CONFIG_ZLIB_INFLATE=m
|
||||||
CONFIG_ZLIB_DEFLATE=m
|
CONFIG_ZLIB_DEFLATE=m
|
||||||
CONFIG_GENERIC_ALLOCATOR=y
|
CONFIG_GENERIC_ALLOCATOR=y
|
||||||
CONFIG_GENERIC_HARDIRQS=y
|
CONFIG_GENERIC_HARDIRQS=y
|
||||||
CONFIG_GENERIC_IRQ_PROBE=y
|
CONFIG_GENERIC_IRQ_PROBE=y
|
||||||
|
CONFIG_GENERIC_PENDING_IRQ=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Profiling support
|
# Instrumentation Support
|
||||||
#
|
#
|
||||||
# CONFIG_PROFILING is not set
|
# CONFIG_PROFILING is not set
|
||||||
|
# CONFIG_KPROBES is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Kernel hacking
|
# Kernel hacking
|
||||||
|
@ -1048,6 +1112,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
|
||||||
CONFIG_DEBUG_KERNEL=y
|
CONFIG_DEBUG_KERNEL=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
CONFIG_LOG_BUF_SHIFT=20
|
CONFIG_LOG_BUF_SHIFT=20
|
||||||
|
CONFIG_DETECT_SOFTLOCKUP=y
|
||||||
# CONFIG_SCHEDSTATS is not set
|
# CONFIG_SCHEDSTATS is not set
|
||||||
# CONFIG_DEBUG_SLAB is not set
|
# CONFIG_DEBUG_SLAB is not set
|
||||||
CONFIG_DEBUG_PREEMPT=y
|
CONFIG_DEBUG_PREEMPT=y
|
||||||
|
@ -1056,7 +1121,8 @@ CONFIG_DEBUG_PREEMPT=y
|
||||||
# CONFIG_DEBUG_KOBJECT is not set
|
# CONFIG_DEBUG_KOBJECT is not set
|
||||||
CONFIG_DEBUG_INFO=y
|
CONFIG_DEBUG_INFO=y
|
||||||
# CONFIG_DEBUG_FS is not set
|
# CONFIG_DEBUG_FS is not set
|
||||||
# CONFIG_KPROBES is not set
|
# CONFIG_DEBUG_VM is not set
|
||||||
|
# CONFIG_RCU_TORTURE_TEST is not set
|
||||||
CONFIG_IA64_GRANULE_16MB=y
|
CONFIG_IA64_GRANULE_16MB=y
|
||||||
# CONFIG_IA64_GRANULE_64MB is not set
|
# CONFIG_IA64_GRANULE_64MB is not set
|
||||||
# CONFIG_IA64_PRINT_HAZARDS is not set
|
# CONFIG_IA64_PRINT_HAZARDS is not set
|
||||||
|
@ -1097,7 +1163,7 @@ CONFIG_CRYPTO_DES=m
|
||||||
# CONFIG_CRYPTO_ANUBIS is not set
|
# CONFIG_CRYPTO_ANUBIS is not set
|
||||||
CONFIG_CRYPTO_DEFLATE=m
|
CONFIG_CRYPTO_DEFLATE=m
|
||||||
# CONFIG_CRYPTO_MICHAEL_MIC is not set
|
# CONFIG_CRYPTO_MICHAEL_MIC is not set
|
||||||
# CONFIG_CRYPTO_CRC32C is not set
|
CONFIG_CRYPTO_CRC32C=m
|
||||||
# CONFIG_CRYPTO_TEST is not set
|
# CONFIG_CRYPTO_TEST is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# Linux kernel version: 2.6.14-rc1
|
# Linux kernel version: 2.6.15-rc4
|
||||||
# Wed Sep 14 15:17:57 2005
|
# Fri Dec 2 16:06:32 2005
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -58,18 +58,37 @@ CONFIG_MODULE_SRCVERSION_ALL=y
|
||||||
CONFIG_KMOD=y
|
CONFIG_KMOD=y
|
||||||
CONFIG_STOP_MACHINE=y
|
CONFIG_STOP_MACHINE=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Block layer
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# IO Schedulers
|
||||||
|
#
|
||||||
|
CONFIG_IOSCHED_NOOP=y
|
||||||
|
CONFIG_IOSCHED_AS=y
|
||||||
|
CONFIG_IOSCHED_DEADLINE=y
|
||||||
|
CONFIG_IOSCHED_CFQ=y
|
||||||
|
CONFIG_DEFAULT_AS=y
|
||||||
|
# CONFIG_DEFAULT_DEADLINE is not set
|
||||||
|
# CONFIG_DEFAULT_CFQ is not set
|
||||||
|
# CONFIG_DEFAULT_NOOP is not set
|
||||||
|
CONFIG_DEFAULT_IOSCHED="anticipatory"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Processor type and features
|
# Processor type and features
|
||||||
#
|
#
|
||||||
CONFIG_IA64=y
|
CONFIG_IA64=y
|
||||||
CONFIG_64BIT=y
|
CONFIG_64BIT=y
|
||||||
CONFIG_MMU=y
|
CONFIG_MMU=y
|
||||||
|
CONFIG_SWIOTLB=y
|
||||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||||
CONFIG_TIME_INTERPOLATION=y
|
CONFIG_TIME_INTERPOLATION=y
|
||||||
CONFIG_EFI=y
|
CONFIG_EFI=y
|
||||||
CONFIG_GENERIC_IOMAP=y
|
CONFIG_GENERIC_IOMAP=y
|
||||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||||
|
CONFIG_ZONE_DMA_IS_DMA32=y
|
||||||
# CONFIG_IA64_GENERIC is not set
|
# CONFIG_IA64_GENERIC is not set
|
||||||
CONFIG_IA64_DIG=y
|
CONFIG_IA64_DIG=y
|
||||||
# CONFIG_IA64_HP_ZX1 is not set
|
# CONFIG_IA64_HP_ZX1 is not set
|
||||||
|
@ -82,18 +101,16 @@ CONFIG_MCKINLEY=y
|
||||||
# CONFIG_IA64_PAGE_SIZE_8KB is not set
|
# CONFIG_IA64_PAGE_SIZE_8KB is not set
|
||||||
CONFIG_IA64_PAGE_SIZE_16KB=y
|
CONFIG_IA64_PAGE_SIZE_16KB=y
|
||||||
# CONFIG_IA64_PAGE_SIZE_64KB is not set
|
# CONFIG_IA64_PAGE_SIZE_64KB is not set
|
||||||
|
CONFIG_PGTABLE_3=y
|
||||||
|
# CONFIG_PGTABLE_4 is not set
|
||||||
# CONFIG_HZ_100 is not set
|
# CONFIG_HZ_100 is not set
|
||||||
CONFIG_HZ_250=y
|
CONFIG_HZ_250=y
|
||||||
# CONFIG_HZ_1000 is not set
|
# CONFIG_HZ_1000 is not set
|
||||||
CONFIG_HZ=250
|
CONFIG_HZ=250
|
||||||
CONFIG_IA64_L1_CACHE_SHIFT=7
|
CONFIG_IA64_L1_CACHE_SHIFT=7
|
||||||
# CONFIG_NUMA is not set
|
|
||||||
CONFIG_VIRTUAL_MEM_MAP=y
|
|
||||||
CONFIG_HOLES_IN_ZONE=y
|
|
||||||
CONFIG_IA64_CYCLONE=y
|
CONFIG_IA64_CYCLONE=y
|
||||||
CONFIG_IOSAPIC=y
|
CONFIG_IOSAPIC=y
|
||||||
# CONFIG_IA64_SGI_SN_XP is not set
|
CONFIG_FORCE_MAX_ZONEORDER=17
|
||||||
CONFIG_FORCE_MAX_ZONEORDER=18
|
|
||||||
CONFIG_SMP=y
|
CONFIG_SMP=y
|
||||||
CONFIG_NR_CPUS=4
|
CONFIG_NR_CPUS=4
|
||||||
CONFIG_HOTPLUG_CPU=y
|
CONFIG_HOTPLUG_CPU=y
|
||||||
|
@ -106,7 +123,13 @@ CONFIG_FLATMEM_MANUAL=y
|
||||||
CONFIG_FLATMEM=y
|
CONFIG_FLATMEM=y
|
||||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||||
# CONFIG_SPARSEMEM_STATIC is not set
|
# CONFIG_SPARSEMEM_STATIC is not set
|
||||||
CONFIG_HAVE_DEC_LOCK=y
|
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||||
|
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||||
|
CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
|
||||||
|
CONFIG_ARCH_FLATMEM_ENABLE=y
|
||||||
|
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||||
|
CONFIG_VIRTUAL_MEM_MAP=y
|
||||||
|
CONFIG_HOLES_IN_ZONE=y
|
||||||
CONFIG_IA32_SUPPORT=y
|
CONFIG_IA32_SUPPORT=y
|
||||||
CONFIG_COMPAT=y
|
CONFIG_COMPAT=y
|
||||||
CONFIG_IA64_MCA_RECOVERY=y
|
CONFIG_IA64_MCA_RECOVERY=y
|
||||||
|
@ -118,7 +141,6 @@ CONFIG_IA64_PALINFO=y
|
||||||
#
|
#
|
||||||
CONFIG_EFI_VARS=y
|
CONFIG_EFI_VARS=y
|
||||||
CONFIG_EFI_PCDP=y
|
CONFIG_EFI_PCDP=y
|
||||||
# CONFIG_DELL_RBU is not set
|
|
||||||
CONFIG_BINFMT_ELF=y
|
CONFIG_BINFMT_ELF=y
|
||||||
CONFIG_BINFMT_MISC=m
|
CONFIG_BINFMT_MISC=m
|
||||||
|
|
||||||
|
@ -126,6 +148,7 @@ CONFIG_BINFMT_MISC=m
|
||||||
# Power management and ACPI
|
# Power management and ACPI
|
||||||
#
|
#
|
||||||
CONFIG_PM=y
|
CONFIG_PM=y
|
||||||
|
CONFIG_PM_LEGACY=y
|
||||||
# CONFIG_PM_DEBUG is not set
|
# CONFIG_PM_DEBUG is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -226,14 +249,16 @@ CONFIG_TCP_CONG_BIC=y
|
||||||
# CONFIG_NET_DIVERT is not set
|
# CONFIG_NET_DIVERT is not set
|
||||||
# CONFIG_ECONET is not set
|
# CONFIG_ECONET is not set
|
||||||
# CONFIG_WAN_ROUTER is not set
|
# CONFIG_WAN_ROUTER is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# QoS and/or fair queueing
|
||||||
|
#
|
||||||
# CONFIG_NET_SCHED is not set
|
# CONFIG_NET_SCHED is not set
|
||||||
# CONFIG_NET_CLS_ROUTE is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Network testing
|
# Network testing
|
||||||
#
|
#
|
||||||
# CONFIG_NET_PKTGEN is not set
|
# CONFIG_NET_PKTGEN is not set
|
||||||
# CONFIG_NETFILTER_NETLINK is not set
|
|
||||||
# CONFIG_HAMRADIO is not set
|
# CONFIG_HAMRADIO is not set
|
||||||
# CONFIG_IRDA is not set
|
# CONFIG_IRDA is not set
|
||||||
# CONFIG_BT is not set
|
# CONFIG_BT is not set
|
||||||
|
@ -295,14 +320,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
|
||||||
CONFIG_BLK_DEV_RAM_SIZE=4096
|
CONFIG_BLK_DEV_RAM_SIZE=4096
|
||||||
CONFIG_BLK_DEV_INITRD=y
|
CONFIG_BLK_DEV_INITRD=y
|
||||||
# CONFIG_CDROM_PKTCDVD is not set
|
# CONFIG_CDROM_PKTCDVD is not set
|
||||||
|
|
||||||
#
|
|
||||||
# IO Schedulers
|
|
||||||
#
|
|
||||||
CONFIG_IOSCHED_NOOP=y
|
|
||||||
CONFIG_IOSCHED_AS=y
|
|
||||||
CONFIG_IOSCHED_DEADLINE=y
|
|
||||||
CONFIG_IOSCHED_CFQ=y
|
|
||||||
# CONFIG_ATA_OVER_ETH is not set
|
# CONFIG_ATA_OVER_ETH is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -400,6 +417,7 @@ CONFIG_SCSI_FC_ATTRS=y
|
||||||
#
|
#
|
||||||
# SCSI low-level drivers
|
# SCSI low-level drivers
|
||||||
#
|
#
|
||||||
|
# CONFIG_ISCSI_TCP is not set
|
||||||
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
|
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
|
||||||
# CONFIG_SCSI_3W_9XXX is not set
|
# CONFIG_SCSI_3W_9XXX is not set
|
||||||
# CONFIG_SCSI_ACARD is not set
|
# CONFIG_SCSI_ACARD is not set
|
||||||
|
@ -409,6 +427,7 @@ CONFIG_SCSI_FC_ATTRS=y
|
||||||
# CONFIG_SCSI_AIC79XX is not set
|
# CONFIG_SCSI_AIC79XX is not set
|
||||||
# CONFIG_MEGARAID_NEWGEN is not set
|
# CONFIG_MEGARAID_NEWGEN is not set
|
||||||
# CONFIG_MEGARAID_LEGACY is not set
|
# CONFIG_MEGARAID_LEGACY is not set
|
||||||
|
# CONFIG_MEGARAID_SAS is not set
|
||||||
# CONFIG_SCSI_SATA is not set
|
# CONFIG_SCSI_SATA is not set
|
||||||
# CONFIG_SCSI_DMX3191D is not set
|
# CONFIG_SCSI_DMX3191D is not set
|
||||||
# CONFIG_SCSI_FUTURE_DOMAIN is not set
|
# CONFIG_SCSI_FUTURE_DOMAIN is not set
|
||||||
|
@ -424,7 +443,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
|
||||||
CONFIG_SCSI_QLOGIC_FC=y
|
CONFIG_SCSI_QLOGIC_FC=y
|
||||||
# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
|
# CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
|
||||||
CONFIG_SCSI_QLOGIC_1280=y
|
CONFIG_SCSI_QLOGIC_1280=y
|
||||||
# CONFIG_SCSI_QLOGIC_1280_1040 is not set
|
|
||||||
CONFIG_SCSI_QLA2XXX=y
|
CONFIG_SCSI_QLA2XXX=y
|
||||||
CONFIG_SCSI_QLA21XX=m
|
CONFIG_SCSI_QLA21XX=m
|
||||||
CONFIG_SCSI_QLA22XX=m
|
CONFIG_SCSI_QLA22XX=m
|
||||||
|
@ -463,6 +481,7 @@ CONFIG_DM_ZERO=m
|
||||||
CONFIG_FUSION=y
|
CONFIG_FUSION=y
|
||||||
CONFIG_FUSION_SPI=y
|
CONFIG_FUSION_SPI=y
|
||||||
CONFIG_FUSION_FC=y
|
CONFIG_FUSION_FC=y
|
||||||
|
# CONFIG_FUSION_SAS is not set
|
||||||
CONFIG_FUSION_MAX_SGE=128
|
CONFIG_FUSION_MAX_SGE=128
|
||||||
CONFIG_FUSION_CTL=y
|
CONFIG_FUSION_CTL=y
|
||||||
|
|
||||||
|
@ -503,6 +522,7 @@ CONFIG_NET_ETHERNET=y
|
||||||
CONFIG_MII=m
|
CONFIG_MII=m
|
||||||
# CONFIG_HAPPYMEAL is not set
|
# CONFIG_HAPPYMEAL is not set
|
||||||
# CONFIG_SUNGEM is not set
|
# CONFIG_SUNGEM is not set
|
||||||
|
# CONFIG_CASSINI is not set
|
||||||
# CONFIG_NET_VENDOR_3COM is not set
|
# CONFIG_NET_VENDOR_3COM is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -727,6 +747,7 @@ CONFIG_MAX_RAW_DEVS=256
|
||||||
# TPM devices
|
# TPM devices
|
||||||
#
|
#
|
||||||
# CONFIG_TCG_TPM is not set
|
# CONFIG_TCG_TPM is not set
|
||||||
|
# CONFIG_TELCLOCK is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# I2C support
|
# I2C support
|
||||||
|
@ -812,12 +833,15 @@ CONFIG_USB_UHCI_HCD=y
|
||||||
#
|
#
|
||||||
# USB Device Class drivers
|
# USB Device Class drivers
|
||||||
#
|
#
|
||||||
# CONFIG_USB_BLUETOOTH_TTY is not set
|
|
||||||
# CONFIG_USB_ACM is not set
|
# CONFIG_USB_ACM is not set
|
||||||
# CONFIG_USB_PRINTER is not set
|
# CONFIG_USB_PRINTER is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
|
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# may also be needed; see USB_STORAGE Help for more information
|
||||||
#
|
#
|
||||||
CONFIG_USB_STORAGE=m
|
CONFIG_USB_STORAGE=m
|
||||||
# CONFIG_USB_STORAGE_DEBUG is not set
|
# CONFIG_USB_STORAGE_DEBUG is not set
|
||||||
|
@ -1123,9 +1147,10 @@ CONFIG_GENERIC_IRQ_PROBE=y
|
||||||
CONFIG_GENERIC_PENDING_IRQ=y
|
CONFIG_GENERIC_PENDING_IRQ=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Profiling support
|
# Instrumentation Support
|
||||||
#
|
#
|
||||||
# CONFIG_PROFILING is not set
|
# CONFIG_PROFILING is not set
|
||||||
|
# CONFIG_KPROBES is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Kernel hacking
|
# Kernel hacking
|
||||||
|
@ -1142,7 +1167,8 @@ CONFIG_DETECT_SOFTLOCKUP=y
|
||||||
# CONFIG_DEBUG_KOBJECT is not set
|
# CONFIG_DEBUG_KOBJECT is not set
|
||||||
# CONFIG_DEBUG_INFO is not set
|
# CONFIG_DEBUG_INFO is not set
|
||||||
# CONFIG_DEBUG_FS is not set
|
# CONFIG_DEBUG_FS is not set
|
||||||
# CONFIG_KPROBES is not set
|
# CONFIG_DEBUG_VM is not set
|
||||||
|
# CONFIG_RCU_TORTURE_TEST is not set
|
||||||
CONFIG_IA64_GRANULE_16MB=y
|
CONFIG_IA64_GRANULE_16MB=y
|
||||||
# CONFIG_IA64_GRANULE_64MB is not set
|
# CONFIG_IA64_GRANULE_64MB is not set
|
||||||
# CONFIG_IA64_PRINT_HAZARDS is not set
|
# CONFIG_IA64_PRINT_HAZARDS is not set
|
||||||
|
|
|
@ -261,8 +261,6 @@ elf32_set_personality (void)
|
||||||
{
|
{
|
||||||
set_personality(PER_LINUX32);
|
set_personality(PER_LINUX32);
|
||||||
current->thread.map_base = IA32_PAGE_OFFSET/3;
|
current->thread.map_base = IA32_PAGE_OFFSET/3;
|
||||||
current->thread.task_size = IA32_PAGE_OFFSET; /* use what Linux/x86 uses... */
|
|
||||||
set_fs(USER_DS); /* set addr limit for new TASK_SIZE */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
|
|
|
@ -305,7 +305,6 @@ struct old_linux32_dirent {
|
||||||
#define ELF_DATA ELFDATA2LSB
|
#define ELF_DATA ELFDATA2LSB
|
||||||
#define ELF_ARCH EM_386
|
#define ELF_ARCH EM_386
|
||||||
|
|
||||||
#define IA32_PAGE_OFFSET 0xc0000000
|
|
||||||
#define IA32_STACK_TOP IA32_PAGE_OFFSET
|
#define IA32_STACK_TOP IA32_PAGE_OFFSET
|
||||||
#define IA32_GATE_OFFSET IA32_PAGE_OFFSET
|
#define IA32_GATE_OFFSET IA32_PAGE_OFFSET
|
||||||
#define IA32_GATE_END IA32_PAGE_OFFSET + PAGE_SIZE
|
#define IA32_GATE_END IA32_PAGE_OFFSET + PAGE_SIZE
|
||||||
|
|
|
@ -630,7 +630,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
|
||||||
*/
|
*/
|
||||||
save_previous_kprobe(kcb);
|
save_previous_kprobe(kcb);
|
||||||
set_current_kprobe(p, kcb);
|
set_current_kprobe(p, kcb);
|
||||||
p->nmissed++;
|
kprobes_inc_nmissed_count(p);
|
||||||
prepare_ss(p, regs);
|
prepare_ss(p, regs);
|
||||||
kcb->kprobe_status = KPROBE_REENTER;
|
kcb->kprobe_status = KPROBE_REENTER;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -721,8 +721,11 @@ flush_thread (void)
|
||||||
/* drop floating-point and debug-register state if it exists: */
|
/* drop floating-point and debug-register state if it exists: */
|
||||||
current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
|
current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
|
||||||
ia64_drop_fpu(current);
|
ia64_drop_fpu(current);
|
||||||
if (IS_IA32_PROCESS(ia64_task_regs(current)))
|
if (IS_IA32_PROCESS(ia64_task_regs(current))) {
|
||||||
ia32_drop_partial_page_list(current);
|
ia32_drop_partial_page_list(current);
|
||||||
|
current->thread.task_size = IA32_PAGE_OFFSET;
|
||||||
|
set_fs(USER_DS);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -293,7 +293,7 @@ retry:
|
||||||
if (file->f_flags & O_NONBLOCK)
|
if (file->f_flags & O_NONBLOCK)
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
if (down_interruptible(&data->sem))
|
if (down_interruptible(&data->sem))
|
||||||
return -ERESTARTSYS;
|
return -EINTR;
|
||||||
}
|
}
|
||||||
|
|
||||||
n = data->cpu_check;
|
n = data->cpu_check;
|
||||||
|
|
|
@ -50,8 +50,10 @@ static nodemask_t memory_less_mask __initdata;
|
||||||
* To prevent cache aliasing effects, align per-node structures so that they
|
* To prevent cache aliasing effects, align per-node structures so that they
|
||||||
* start at addresses that are strided by node number.
|
* start at addresses that are strided by node number.
|
||||||
*/
|
*/
|
||||||
|
#define MAX_NODE_ALIGN_OFFSET (32 * 1024 * 1024)
|
||||||
#define NODEDATA_ALIGN(addr, node) \
|
#define NODEDATA_ALIGN(addr, node) \
|
||||||
((((addr) + 1024*1024-1) & ~(1024*1024-1)) + (node)*PERCPU_PAGE_SIZE)
|
((((addr) + 1024*1024-1) & ~(1024*1024-1)) + \
|
||||||
|
(((node)*PERCPU_PAGE_SIZE) & (MAX_NODE_ALIGN_OFFSET - 1)))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* build_node_maps - callback to setup bootmem structs for each node
|
* build_node_maps - callback to setup bootmem structs for each node
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
* for more details.
|
* for more details.
|
||||||
*
|
*
|
||||||
* Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved.
|
* Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/bootmem.h>
|
#include <linux/bootmem.h>
|
||||||
|
@ -146,6 +146,24 @@ sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev,
|
||||||
return ret_stuff.v0;
|
return ret_stuff.v0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* sn_pcidev_info_get() - Retrieve the pcidev_info struct for the specified
|
||||||
|
* device.
|
||||||
|
*/
|
||||||
|
inline struct pcidev_info *
|
||||||
|
sn_pcidev_info_get(struct pci_dev *dev)
|
||||||
|
{
|
||||||
|
struct pcidev_info *pcidev;
|
||||||
|
|
||||||
|
list_for_each_entry(pcidev,
|
||||||
|
&(SN_PCI_CONTROLLER(dev)->pcidev_info), pdi_list) {
|
||||||
|
if (pcidev->pdi_linux_pcidev == dev) {
|
||||||
|
return pcidev;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* sn_fixup_ionodes() - This routine initializes the HUB data strcuture for
|
* sn_fixup_ionodes() - This routine initializes the HUB data strcuture for
|
||||||
* each node in the system.
|
* each node in the system.
|
||||||
|
@ -229,6 +247,50 @@ static void sn_fixup_ionodes(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* sn_pci_window_fixup() - Create a pci_window for each device resource.
|
||||||
|
* Until ACPI support is added, we need this code
|
||||||
|
* to setup pci_windows for use by
|
||||||
|
* pcibios_bus_to_resource(),
|
||||||
|
* pcibios_resource_to_bus(), etc.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
sn_pci_window_fixup(struct pci_dev *dev, unsigned int count,
|
||||||
|
int64_t * pci_addrs)
|
||||||
|
{
|
||||||
|
struct pci_controller *controller = PCI_CONTROLLER(dev->bus);
|
||||||
|
unsigned int i;
|
||||||
|
unsigned int idx;
|
||||||
|
unsigned int new_count;
|
||||||
|
struct pci_window *new_window;
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
return;
|
||||||
|
idx = controller->windows;
|
||||||
|
new_count = controller->windows + count;
|
||||||
|
new_window = kcalloc(new_count, sizeof(struct pci_window), GFP_KERNEL);
|
||||||
|
if (new_window == NULL)
|
||||||
|
BUG();
|
||||||
|
if (controller->window) {
|
||||||
|
memcpy(new_window, controller->window,
|
||||||
|
sizeof(struct pci_window) * controller->windows);
|
||||||
|
kfree(controller->window);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Setup a pci_window for each device resource. */
|
||||||
|
for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
|
||||||
|
if (pci_addrs[i] == -1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
new_window[idx].offset = dev->resource[i].start - pci_addrs[i];
|
||||||
|
new_window[idx].resource = dev->resource[i];
|
||||||
|
idx++;
|
||||||
|
}
|
||||||
|
|
||||||
|
controller->windows = new_count;
|
||||||
|
controller->window = new_window;
|
||||||
|
}
|
||||||
|
|
||||||
void sn_pci_unfixup_slot(struct pci_dev *dev)
|
void sn_pci_unfixup_slot(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
|
struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
|
||||||
|
@ -246,21 +308,23 @@ void sn_pci_unfixup_slot(struct pci_dev *dev)
|
||||||
*/
|
*/
|
||||||
void sn_pci_fixup_slot(struct pci_dev *dev)
|
void sn_pci_fixup_slot(struct pci_dev *dev)
|
||||||
{
|
{
|
||||||
|
unsigned int count = 0;
|
||||||
int idx;
|
int idx;
|
||||||
int segment = pci_domain_nr(dev->bus);
|
int segment = pci_domain_nr(dev->bus);
|
||||||
int status = 0;
|
int status = 0;
|
||||||
struct pcibus_bussoft *bs;
|
struct pcibus_bussoft *bs;
|
||||||
struct pci_bus *host_pci_bus;
|
struct pci_bus *host_pci_bus;
|
||||||
struct pci_dev *host_pci_dev;
|
struct pci_dev *host_pci_dev;
|
||||||
|
struct pcidev_info *pcidev_info;
|
||||||
|
int64_t pci_addrs[PCI_ROM_RESOURCE + 1];
|
||||||
struct sn_irq_info *sn_irq_info;
|
struct sn_irq_info *sn_irq_info;
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
unsigned int bus_no, devfn;
|
unsigned int bus_no, devfn;
|
||||||
|
|
||||||
pci_dev_get(dev); /* for the sysdata pointer */
|
pci_dev_get(dev); /* for the sysdata pointer */
|
||||||
dev->sysdata = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL);
|
pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
|
||||||
if (SN_PCIDEV_INFO(dev) <= 0)
|
if (pcidev_info <= 0)
|
||||||
BUG(); /* Cannot afford to run out of memory */
|
BUG(); /* Cannot afford to run out of memory */
|
||||||
memset(SN_PCIDEV_INFO(dev), 0, sizeof(struct pcidev_info));
|
|
||||||
|
|
||||||
sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
|
sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
|
||||||
if (sn_irq_info <= 0)
|
if (sn_irq_info <= 0)
|
||||||
|
@ -270,22 +334,34 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
|
||||||
/* Call to retrieve pci device information needed by kernel. */
|
/* Call to retrieve pci device information needed by kernel. */
|
||||||
status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number,
|
status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number,
|
||||||
dev->devfn,
|
dev->devfn,
|
||||||
(u64) __pa(SN_PCIDEV_INFO(dev)),
|
(u64) __pa(pcidev_info),
|
||||||
(u64) __pa(sn_irq_info));
|
(u64) __pa(sn_irq_info));
|
||||||
if (status)
|
if (status)
|
||||||
BUG(); /* Cannot get platform pci device information */
|
BUG(); /* Cannot get platform pci device information */
|
||||||
|
|
||||||
|
/* Add pcidev_info to list in sn_pci_controller struct */
|
||||||
|
list_add_tail(&pcidev_info->pdi_list,
|
||||||
|
&(SN_PCI_CONTROLLER(dev->bus)->pcidev_info));
|
||||||
|
|
||||||
/* Copy over PIO Mapped Addresses */
|
/* Copy over PIO Mapped Addresses */
|
||||||
for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {
|
for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {
|
||||||
unsigned long start, end, addr;
|
unsigned long start, end, addr;
|
||||||
|
|
||||||
if (!SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx])
|
if (!pcidev_info->pdi_pio_mapped_addr[idx]) {
|
||||||
|
pci_addrs[idx] = -1;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
start = dev->resource[idx].start;
|
start = dev->resource[idx].start;
|
||||||
end = dev->resource[idx].end;
|
end = dev->resource[idx].end;
|
||||||
size = end - start;
|
size = end - start;
|
||||||
addr = SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx];
|
if (size == 0) {
|
||||||
|
pci_addrs[idx] = -1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
pci_addrs[idx] = start;
|
||||||
|
count++;
|
||||||
|
addr = pcidev_info->pdi_pio_mapped_addr[idx];
|
||||||
addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
|
addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
|
||||||
dev->resource[idx].start = addr;
|
dev->resource[idx].start = addr;
|
||||||
dev->resource[idx].end = addr + size;
|
dev->resource[idx].end = addr + size;
|
||||||
|
@ -294,23 +370,27 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
|
||||||
else
|
else
|
||||||
dev->resource[idx].parent = &iomem_resource;
|
dev->resource[idx].parent = &iomem_resource;
|
||||||
}
|
}
|
||||||
|
/* Create a pci_window in the pci_controller struct for
|
||||||
|
* each device resource.
|
||||||
|
*/
|
||||||
|
if (count > 0)
|
||||||
|
sn_pci_window_fixup(dev, count, pci_addrs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Using the PROMs values for the PCI host bus, get the Linux
|
* Using the PROMs values for the PCI host bus, get the Linux
|
||||||
* PCI host_pci_dev struct and set up host bus linkages
|
* PCI host_pci_dev struct and set up host bus linkages
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bus_no = (SN_PCIDEV_INFO(dev)->pdi_slot_host_handle >> 32) & 0xff;
|
bus_no = (pcidev_info->pdi_slot_host_handle >> 32) & 0xff;
|
||||||
devfn = SN_PCIDEV_INFO(dev)->pdi_slot_host_handle & 0xffffffff;
|
devfn = pcidev_info->pdi_slot_host_handle & 0xffffffff;
|
||||||
host_pci_bus = pci_find_bus(segment, bus_no);
|
host_pci_bus = pci_find_bus(segment, bus_no);
|
||||||
host_pci_dev = pci_get_slot(host_pci_bus, devfn);
|
host_pci_dev = pci_get_slot(host_pci_bus, devfn);
|
||||||
|
|
||||||
SN_PCIDEV_INFO(dev)->host_pci_dev = host_pci_dev;
|
pcidev_info->host_pci_dev = host_pci_dev;
|
||||||
SN_PCIDEV_INFO(dev)->pdi_host_pcidev_info =
|
pcidev_info->pdi_linux_pcidev = dev;
|
||||||
SN_PCIDEV_INFO(host_pci_dev);
|
pcidev_info->pdi_host_pcidev_info = SN_PCIDEV_INFO(host_pci_dev);
|
||||||
SN_PCIDEV_INFO(dev)->pdi_linux_pcidev = dev;
|
|
||||||
bs = SN_PCIBUS_BUSSOFT(dev->bus);
|
bs = SN_PCIBUS_BUSSOFT(dev->bus);
|
||||||
SN_PCIDEV_INFO(dev)->pdi_pcibus_info = bs;
|
pcidev_info->pdi_pcibus_info = bs;
|
||||||
|
|
||||||
if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {
|
if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {
|
||||||
SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];
|
SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];
|
||||||
|
@ -320,11 +400,11 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
|
||||||
|
|
||||||
/* Only set up IRQ stuff if this device has a host bus context */
|
/* Only set up IRQ stuff if this device has a host bus context */
|
||||||
if (bs && sn_irq_info->irq_irq) {
|
if (bs && sn_irq_info->irq_irq) {
|
||||||
SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = sn_irq_info;
|
pcidev_info->pdi_sn_irq_info = sn_irq_info;
|
||||||
dev->irq = SN_PCIDEV_INFO(dev)->pdi_sn_irq_info->irq_irq;
|
dev->irq = pcidev_info->pdi_sn_irq_info->irq_irq;
|
||||||
sn_irq_fixup(dev, sn_irq_info);
|
sn_irq_fixup(dev, sn_irq_info);
|
||||||
} else {
|
} else {
|
||||||
SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = NULL;
|
pcidev_info->pdi_sn_irq_info = NULL;
|
||||||
kfree(sn_irq_info);
|
kfree(sn_irq_info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -338,6 +418,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
|
||||||
int status = 0;
|
int status = 0;
|
||||||
int nasid, cnode;
|
int nasid, cnode;
|
||||||
struct pci_controller *controller;
|
struct pci_controller *controller;
|
||||||
|
struct sn_pci_controller *sn_controller;
|
||||||
struct pcibus_bussoft *prom_bussoft_ptr;
|
struct pcibus_bussoft *prom_bussoft_ptr;
|
||||||
struct hubdev_info *hubdev_info;
|
struct hubdev_info *hubdev_info;
|
||||||
void *provider_soft = NULL;
|
void *provider_soft = NULL;
|
||||||
|
@ -349,10 +430,15 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
|
||||||
return; /*bus # does not exist */
|
return; /*bus # does not exist */
|
||||||
prom_bussoft_ptr = __va(prom_bussoft_ptr);
|
prom_bussoft_ptr = __va(prom_bussoft_ptr);
|
||||||
|
|
||||||
controller = kzalloc(sizeof(struct pci_controller), GFP_KERNEL);
|
/* Allocate a sn_pci_controller, which has a pci_controller struct
|
||||||
|
* as the first member.
|
||||||
|
*/
|
||||||
|
sn_controller = kzalloc(sizeof(struct sn_pci_controller), GFP_KERNEL);
|
||||||
|
if (!sn_controller)
|
||||||
|
BUG();
|
||||||
|
INIT_LIST_HEAD(&sn_controller->pcidev_info);
|
||||||
|
controller = &sn_controller->pci_controller;
|
||||||
controller->segment = segment;
|
controller->segment = segment;
|
||||||
if (!controller)
|
|
||||||
BUG();
|
|
||||||
|
|
||||||
if (bus == NULL) {
|
if (bus == NULL) {
|
||||||
bus = pci_scan_bus(busnum, &pci_root_ops, controller);
|
bus = pci_scan_bus(busnum, &pci_root_ops, controller);
|
||||||
|
@ -389,6 +475,29 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Setup pci_windows for legacy IO and MEM space.
|
||||||
|
* (Temporary until ACPI support is in place.)
|
||||||
|
*/
|
||||||
|
controller->window = kcalloc(2, sizeof(struct pci_window), GFP_KERNEL);
|
||||||
|
if (controller->window == NULL)
|
||||||
|
BUG();
|
||||||
|
controller->window[0].offset = prom_bussoft_ptr->bs_legacy_io;
|
||||||
|
controller->window[0].resource.name = "legacy_io";
|
||||||
|
controller->window[0].resource.flags = IORESOURCE_IO;
|
||||||
|
controller->window[0].resource.start = prom_bussoft_ptr->bs_legacy_io;
|
||||||
|
controller->window[0].resource.end =
|
||||||
|
controller->window[0].resource.start + 0xffff;
|
||||||
|
controller->window[0].resource.parent = &ioport_resource;
|
||||||
|
controller->window[1].offset = prom_bussoft_ptr->bs_legacy_mem;
|
||||||
|
controller->window[1].resource.name = "legacy_mem";
|
||||||
|
controller->window[1].resource.flags = IORESOURCE_MEM;
|
||||||
|
controller->window[1].resource.start = prom_bussoft_ptr->bs_legacy_mem;
|
||||||
|
controller->window[1].resource.end =
|
||||||
|
controller->window[1].resource.start + (1024 * 1024) - 1;
|
||||||
|
controller->window[1].resource.parent = &iomem_resource;
|
||||||
|
controller->windows = 2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic bus fixup goes here. Don't reference prom_bussoft_ptr
|
* Generic bus fixup goes here. Don't reference prom_bussoft_ptr
|
||||||
* after this point.
|
* after this point.
|
||||||
|
@ -421,7 +530,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
|
||||||
|
|
||||||
error_return:
|
error_return:
|
||||||
|
|
||||||
kfree(controller);
|
kfree(sn_controller);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,7 +543,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
|
||||||
dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
|
dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
element->sysdata = dev->sysdata;
|
element->sysdata = SN_PCIDEV_INFO(dev);
|
||||||
list_add(&element->entry, &sn_sysdata_list);
|
list_add(&element->entry, &sn_sysdata_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,13 @@ sn2_ptc_deadlock_recovery_core:
|
||||||
mov r8=r0
|
mov r8=r0
|
||||||
|
|
||||||
1:
|
1:
|
||||||
|
cmp.ne p8,p9=r0,ptc1 // Test for shub type (ptc1 non-null on shub1)
|
||||||
|
// p8 = 1 if shub1, p9 = 1 if shub2
|
||||||
|
|
||||||
add scr2=ALIAS_OFFSET,piowc // Address of WRITE_STATUS alias register
|
add scr2=ALIAS_OFFSET,piowc // Address of WRITE_STATUS alias register
|
||||||
;;
|
mov scr1=7;; // Clear DEADLOCK, WRITE_ERROR, MULTI_WRITE_ERROR
|
||||||
ld8.acq scr1=[scr2];;
|
(p8) st8.rel [scr2]=scr1;;
|
||||||
|
(p9) ld8.acq scr1=[scr2];;
|
||||||
|
|
||||||
5: ld8.acq scr1=[piowc];; // Wait for PIOs to complete.
|
5: ld8.acq scr1=[piowc];; // Wait for PIOs to complete.
|
||||||
hint @pause
|
hint @pause
|
||||||
|
|
|
@ -67,8 +67,8 @@ unsigned long setup_zero_pages(void)
|
||||||
|
|
||||||
page = virt_to_page(empty_zero_page);
|
page = virt_to_page(empty_zero_page);
|
||||||
while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) {
|
while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) {
|
||||||
set_bit(PG_reserved, &page->flags);
|
SetPageReserved(page);
|
||||||
reset_page_mapcount(page);
|
set_page_count(page, 1);
|
||||||
page++;
|
page++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ config SMP
|
||||||
If you don't know what to do here, say N.
|
If you don't know what to do here, say N.
|
||||||
|
|
||||||
config NR_CPUS
|
config NR_CPUS
|
||||||
int "Maximum number of CPUs (2-32)"
|
int "Maximum number of CPUs (2-128)"
|
||||||
range 2 128
|
range 2 128
|
||||||
depends on SMP
|
depends on SMP
|
||||||
default "32" if PPC64
|
default "32" if PPC64
|
||||||
|
|
|
@ -177,7 +177,7 @@ static inline int kprobe_handler(struct pt_regs *regs)
|
||||||
save_previous_kprobe(kcb);
|
save_previous_kprobe(kcb);
|
||||||
set_current_kprobe(p, regs, kcb);
|
set_current_kprobe(p, regs, kcb);
|
||||||
kcb->kprobe_saved_msr = regs->msr;
|
kcb->kprobe_saved_msr = regs->msr;
|
||||||
p->nmissed++;
|
kprobes_inc_nmissed_count(p);
|
||||||
prepare_singlestep(p, regs);
|
prepare_singlestep(p, regs);
|
||||||
kcb->kprobe_status = KPROBE_REENTER;
|
kcb->kprobe_status = KPROBE_REENTER;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -102,7 +102,15 @@ int boot_cpuid_phys = 0;
|
||||||
dev_t boot_dev;
|
dev_t boot_dev;
|
||||||
u64 ppc64_pft_size;
|
u64 ppc64_pft_size;
|
||||||
|
|
||||||
struct ppc64_caches ppc64_caches;
|
/* Pick defaults since we might want to patch instructions
|
||||||
|
* before we've read this from the device tree.
|
||||||
|
*/
|
||||||
|
struct ppc64_caches ppc64_caches = {
|
||||||
|
.dline_size = 0x80,
|
||||||
|
.log_dline_size = 7,
|
||||||
|
.iline_size = 0x80,
|
||||||
|
.log_iline_size = 7
|
||||||
|
};
|
||||||
EXPORT_SYMBOL_GPL(ppc64_caches);
|
EXPORT_SYMBOL_GPL(ppc64_caches);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -601,7 +601,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
|
||||||
/* Handle hugepage regions */
|
/* Handle hugepage regions */
|
||||||
if (unlikely(in_hugepage_area(mm->context, ea))) {
|
if (unlikely(in_hugepage_area(mm->context, ea))) {
|
||||||
DBG_LOW(" -> huge page !\n");
|
DBG_LOW(" -> huge page !\n");
|
||||||
return hash_huge_page(mm, access, ea, vsid, local);
|
return hash_huge_page(mm, access, ea, vsid, local, trap);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get PTE and page size from page tables */
|
/* Get PTE and page size from page tables */
|
||||||
|
|
|
@ -148,43 +148,63 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct slb_flush_info {
|
||||||
|
struct mm_struct *mm;
|
||||||
|
u16 newareas;
|
||||||
|
};
|
||||||
|
|
||||||
static void flush_low_segments(void *parm)
|
static void flush_low_segments(void *parm)
|
||||||
{
|
{
|
||||||
u16 areas = (unsigned long) parm;
|
struct slb_flush_info *fi = parm;
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
|
|
||||||
|
BUILD_BUG_ON((sizeof(fi->newareas)*8) != NUM_LOW_AREAS);
|
||||||
|
|
||||||
|
if (current->active_mm != fi->mm)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Only need to do anything if this CPU is working in the same
|
||||||
|
* mm as the one which has changed */
|
||||||
|
|
||||||
|
/* update the paca copy of the context struct */
|
||||||
|
get_paca()->context = current->active_mm->context;
|
||||||
|
|
||||||
asm volatile("isync" : : : "memory");
|
asm volatile("isync" : : : "memory");
|
||||||
|
|
||||||
BUILD_BUG_ON((sizeof(areas)*8) != NUM_LOW_AREAS);
|
|
||||||
|
|
||||||
for (i = 0; i < NUM_LOW_AREAS; i++) {
|
for (i = 0; i < NUM_LOW_AREAS; i++) {
|
||||||
if (! (areas & (1U << i)))
|
if (! (fi->newareas & (1U << i)))
|
||||||
continue;
|
continue;
|
||||||
asm volatile("slbie %0"
|
asm volatile("slbie %0"
|
||||||
: : "r" ((i << SID_SHIFT) | SLBIE_C));
|
: : "r" ((i << SID_SHIFT) | SLBIE_C));
|
||||||
}
|
}
|
||||||
|
|
||||||
asm volatile("isync" : : : "memory");
|
asm volatile("isync" : : : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void flush_high_segments(void *parm)
|
static void flush_high_segments(void *parm)
|
||||||
{
|
{
|
||||||
u16 areas = (unsigned long) parm;
|
struct slb_flush_info *fi = parm;
|
||||||
unsigned long i, j;
|
unsigned long i, j;
|
||||||
|
|
||||||
|
|
||||||
|
BUILD_BUG_ON((sizeof(fi->newareas)*8) != NUM_HIGH_AREAS);
|
||||||
|
|
||||||
|
if (current->active_mm != fi->mm)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Only need to do anything if this CPU is working in the same
|
||||||
|
* mm as the one which has changed */
|
||||||
|
|
||||||
|
/* update the paca copy of the context struct */
|
||||||
|
get_paca()->context = current->active_mm->context;
|
||||||
|
|
||||||
asm volatile("isync" : : : "memory");
|
asm volatile("isync" : : : "memory");
|
||||||
|
|
||||||
BUILD_BUG_ON((sizeof(areas)*8) != NUM_HIGH_AREAS);
|
|
||||||
|
|
||||||
for (i = 0; i < NUM_HIGH_AREAS; i++) {
|
for (i = 0; i < NUM_HIGH_AREAS; i++) {
|
||||||
if (! (areas & (1U << i)))
|
if (! (fi->newareas & (1U << i)))
|
||||||
continue;
|
continue;
|
||||||
for (j = 0; j < (1UL << (HTLB_AREA_SHIFT-SID_SHIFT)); j++)
|
for (j = 0; j < (1UL << (HTLB_AREA_SHIFT-SID_SHIFT)); j++)
|
||||||
asm volatile("slbie %0"
|
asm volatile("slbie %0"
|
||||||
:: "r" (((i << HTLB_AREA_SHIFT)
|
:: "r" (((i << HTLB_AREA_SHIFT)
|
||||||
+ (j << SID_SHIFT)) | SLBIE_C));
|
+ (j << SID_SHIFT)) | SLBIE_C));
|
||||||
}
|
}
|
||||||
|
|
||||||
asm volatile("isync" : : : "memory");
|
asm volatile("isync" : : : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,6 +249,7 @@ static int prepare_high_area_for_htlb(struct mm_struct *mm, unsigned long area)
|
||||||
static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)
|
static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)
|
||||||
{
|
{
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
|
struct slb_flush_info fi;
|
||||||
|
|
||||||
BUILD_BUG_ON((sizeof(newareas)*8) != NUM_LOW_AREAS);
|
BUILD_BUG_ON((sizeof(newareas)*8) != NUM_LOW_AREAS);
|
||||||
BUILD_BUG_ON((sizeof(mm->context.low_htlb_areas)*8) != NUM_LOW_AREAS);
|
BUILD_BUG_ON((sizeof(mm->context.low_htlb_areas)*8) != NUM_LOW_AREAS);
|
||||||
|
@ -244,19 +265,20 @@ static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)
|
||||||
|
|
||||||
mm->context.low_htlb_areas |= newareas;
|
mm->context.low_htlb_areas |= newareas;
|
||||||
|
|
||||||
/* update the paca copy of the context struct */
|
|
||||||
get_paca()->context = mm->context;
|
|
||||||
|
|
||||||
/* the context change must make it to memory before the flush,
|
/* the context change must make it to memory before the flush,
|
||||||
* so that further SLB misses do the right thing. */
|
* so that further SLB misses do the right thing. */
|
||||||
mb();
|
mb();
|
||||||
on_each_cpu(flush_low_segments, (void *)(unsigned long)newareas, 0, 1);
|
|
||||||
|
fi.mm = mm;
|
||||||
|
fi.newareas = newareas;
|
||||||
|
on_each_cpu(flush_low_segments, &fi, 0, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
|
static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
|
||||||
{
|
{
|
||||||
|
struct slb_flush_info fi;
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
|
|
||||||
BUILD_BUG_ON((sizeof(newareas)*8) != NUM_HIGH_AREAS);
|
BUILD_BUG_ON((sizeof(newareas)*8) != NUM_HIGH_AREAS);
|
||||||
|
@ -280,7 +302,10 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
|
||||||
/* the context change must make it to memory before the flush,
|
/* the context change must make it to memory before the flush,
|
||||||
* so that further SLB misses do the right thing. */
|
* so that further SLB misses do the right thing. */
|
||||||
mb();
|
mb();
|
||||||
on_each_cpu(flush_high_segments, (void *)(unsigned long)newareas, 0, 1);
|
|
||||||
|
fi.mm = mm;
|
||||||
|
fi.newareas = newareas;
|
||||||
|
on_each_cpu(flush_high_segments, &fi, 0, 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -639,8 +664,36 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Called by asm hashtable.S for doing lazy icache flush
|
||||||
|
*/
|
||||||
|
static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags,
|
||||||
|
pte_t pte, int trap)
|
||||||
|
{
|
||||||
|
struct page *page;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (!pfn_valid(pte_pfn(pte)))
|
||||||
|
return rflags;
|
||||||
|
|
||||||
|
page = pte_page(pte);
|
||||||
|
|
||||||
|
/* page is dirty */
|
||||||
|
if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) {
|
||||||
|
if (trap == 0x400) {
|
||||||
|
for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++)
|
||||||
|
__flush_dcache_icache(page_address(page+i));
|
||||||
|
set_bit(PG_arch_1, &page->flags);
|
||||||
|
} else {
|
||||||
|
rflags |= HPTE_R_N;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rflags;
|
||||||
|
}
|
||||||
|
|
||||||
int hash_huge_page(struct mm_struct *mm, unsigned long access,
|
int hash_huge_page(struct mm_struct *mm, unsigned long access,
|
||||||
unsigned long ea, unsigned long vsid, int local)
|
unsigned long ea, unsigned long vsid, int local,
|
||||||
|
unsigned long trap)
|
||||||
{
|
{
|
||||||
pte_t *ptep;
|
pte_t *ptep;
|
||||||
unsigned long old_pte, new_pte;
|
unsigned long old_pte, new_pte;
|
||||||
|
@ -691,6 +744,11 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
|
||||||
rflags = 0x2 | (!(new_pte & _PAGE_RW));
|
rflags = 0x2 | (!(new_pte & _PAGE_RW));
|
||||||
/* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */
|
/* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */
|
||||||
rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N);
|
rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N);
|
||||||
|
if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
|
||||||
|
/* No CPU has hugepages but lacks no execute, so we
|
||||||
|
* don't need to worry about that case */
|
||||||
|
rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte),
|
||||||
|
trap);
|
||||||
|
|
||||||
/* Check if pte already has an hpte (case 2) */
|
/* Check if pte already has an hpte (case 2) */
|
||||||
if (unlikely(old_pte & _PAGE_HASHPTE)) {
|
if (unlikely(old_pte & _PAGE_HASHPTE)) {
|
||||||
|
@ -703,7 +761,8 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
|
||||||
slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
|
slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
|
||||||
slot += (old_pte & _PAGE_F_GIX) >> 12;
|
slot += (old_pte & _PAGE_F_GIX) >> 12;
|
||||||
|
|
||||||
if (ppc_md.hpte_updatepp(slot, rflags, va, 1, local) == -1)
|
if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_huge_psize,
|
||||||
|
local) == -1)
|
||||||
old_pte &= ~_PAGE_HPTEFLAGS;
|
old_pte &= ~_PAGE_HPTEFLAGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -125,7 +125,7 @@ void __init get_region(unsigned int nid, unsigned long *start_pfn,
|
||||||
|
|
||||||
/* We didnt find a matching region, return start/end as 0 */
|
/* We didnt find a matching region, return start/end as 0 */
|
||||||
if (*start_pfn == -1UL)
|
if (*start_pfn == -1UL)
|
||||||
start_pfn = 0;
|
*start_pfn = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void map_cpu_to_node(int cpu, int node)
|
static inline void map_cpu_to_node(int cpu, int node)
|
||||||
|
|
|
@ -288,11 +288,6 @@ void stab_initialize(unsigned long stab)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_PPC_ISERIES */
|
#endif /* CONFIG_PPC_ISERIES */
|
||||||
#ifdef CONFIG_PPC_PSERIES
|
|
||||||
if (platform_is_lpar()) {
|
|
||||||
plpar_hcall_norets(H_SET_ASR, stabreal);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
mtspr(SPRN_ASR, stabreal);
|
mtspr(SPRN_ASR, stabreal);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1650,11 +1650,19 @@ void pmac_tweak_clock_spreading(int enable)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (macio->type == macio_intrepid) {
|
if (macio->type == macio_intrepid) {
|
||||||
if (enable)
|
struct device_node *clock =
|
||||||
UN_OUT(UNI_N_CLOCK_SPREADING, 2);
|
of_find_node_by_path("/uni-n@f8000000/hw-clock");
|
||||||
else
|
if (clock && get_property(clock, "platform-do-clockspreading",
|
||||||
UN_OUT(UNI_N_CLOCK_SPREADING, 0);
|
NULL)) {
|
||||||
mdelay(40);
|
printk(KERN_INFO "%sabling clock spreading on Intrepid"
|
||||||
|
" ASIC\n", enable ? "En" : "Dis");
|
||||||
|
if (enable)
|
||||||
|
UN_OUT(UNI_N_CLOCK_SPREADING, 2);
|
||||||
|
else
|
||||||
|
UN_OUT(UNI_N_CLOCK_SPREADING, 0);
|
||||||
|
mdelay(40);
|
||||||
|
}
|
||||||
|
of_node_put(clock);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (machine_is_compatible("PowerBook5,2") ||
|
while (machine_is_compatible("PowerBook5,2") ||
|
||||||
|
@ -1724,6 +1732,9 @@ void pmac_tweak_clock_spreading(int enable)
|
||||||
pmac_low_i2c_close(ui2c);
|
pmac_low_i2c_close(ui2c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
printk(KERN_INFO "%sabling clock spreading on i2c clock chip\n",
|
||||||
|
enable ? "En" : "Dis");
|
||||||
|
|
||||||
pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
|
pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
|
||||||
rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
|
rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
|
||||||
DBG("write result: %d,", rc);
|
DBG("write result: %d,", rc);
|
||||||
|
|
|
@ -109,6 +109,9 @@ static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
|
||||||
u64 rc;
|
u64 rc;
|
||||||
union tce_entry tce;
|
union tce_entry tce;
|
||||||
|
|
||||||
|
tcenum <<= TCE_PAGE_FACTOR;
|
||||||
|
npages <<= TCE_PAGE_FACTOR;
|
||||||
|
|
||||||
tce.te_word = 0;
|
tce.te_word = 0;
|
||||||
tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
|
tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
|
||||||
tce.te_rdwr = 1;
|
tce.te_rdwr = 1;
|
||||||
|
@ -143,10 +146,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
|
||||||
union tce_entry tce, *tcep;
|
union tce_entry tce, *tcep;
|
||||||
long l, limit;
|
long l, limit;
|
||||||
|
|
||||||
tcenum <<= TCE_PAGE_FACTOR;
|
if (TCE_PAGE_FACTOR == 0 && npages == 1)
|
||||||
npages <<= TCE_PAGE_FACTOR;
|
|
||||||
|
|
||||||
if (npages == 1)
|
|
||||||
return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
|
return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
|
||||||
direction);
|
direction);
|
||||||
|
|
||||||
|
@ -164,6 +164,9 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
|
||||||
__get_cpu_var(tce_page) = tcep;
|
__get_cpu_var(tce_page) = tcep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tcenum <<= TCE_PAGE_FACTOR;
|
||||||
|
npages <<= TCE_PAGE_FACTOR;
|
||||||
|
|
||||||
tce.te_word = 0;
|
tce.te_word = 0;
|
||||||
tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
|
tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
|
||||||
tce.te_rdwr = 1;
|
tce.te_rdwr = 1;
|
||||||
|
|
|
@ -298,18 +298,6 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
|
||||||
if (!(vflags & HPTE_V_BOLTED))
|
if (!(vflags & HPTE_V_BOLTED))
|
||||||
DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
|
DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
|
||||||
|
|
||||||
#if 1
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
for (i=0;i<8;i++) {
|
|
||||||
unsigned long w0, w1;
|
|
||||||
plpar_pte_read(0, hpte_group, &w0, &w1);
|
|
||||||
BUG_ON (HPTE_V_COMPARE(hpte_v, w0)
|
|
||||||
&& (w0 & HPTE_V_VALID));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Now fill in the actual HPTE */
|
/* Now fill in the actual HPTE */
|
||||||
/* Set CEC cookie to 0 */
|
/* Set CEC cookie to 0 */
|
||||||
/* Zero page = 0 */
|
/* Zero page = 0 */
|
||||||
|
|
|
@ -767,14 +767,14 @@ config CPM2
|
||||||
on it (826x, 827x, 8560).
|
on it (826x, 827x, 8560).
|
||||||
|
|
||||||
config PPC_CHRP
|
config PPC_CHRP
|
||||||
bool " Common Hardware Reference Platform (CHRP) based machines"
|
bool
|
||||||
depends on PPC_MULTIPLATFORM
|
depends on PPC_MULTIPLATFORM
|
||||||
select PPC_I8259
|
select PPC_I8259
|
||||||
select PPC_INDIRECT_PCI
|
select PPC_INDIRECT_PCI
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config PPC_PMAC
|
config PPC_PMAC
|
||||||
bool " Apple PowerMac based machines"
|
bool
|
||||||
depends on PPC_MULTIPLATFORM
|
depends on PPC_MULTIPLATFORM
|
||||||
select PPC_INDIRECT_PCI
|
select PPC_INDIRECT_PCI
|
||||||
default y
|
default y
|
||||||
|
@ -785,7 +785,7 @@ config PPC_PMAC64
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config PPC_PREP
|
config PPC_PREP
|
||||||
bool " PowerPC Reference Platform (PReP) based machines"
|
bool
|
||||||
depends on PPC_MULTIPLATFORM
|
depends on PPC_MULTIPLATFORM
|
||||||
select PPC_I8259
|
select PPC_I8259
|
||||||
select PPC_INDIRECT_PCI
|
select PPC_INDIRECT_PCI
|
||||||
|
|
|
@ -301,6 +301,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||||
|
|
||||||
/* Probe platform for CPUs: always linear. */
|
/* Probe platform for CPUs: always linear. */
|
||||||
num_cpus = smp_ops->probe();
|
num_cpus = smp_ops->probe();
|
||||||
|
|
||||||
|
if (num_cpus < 2)
|
||||||
|
smp_tb_synchronized = 1;
|
||||||
|
|
||||||
for (i = 0; i < num_cpus; ++i)
|
for (i = 0; i < num_cpus; ++i)
|
||||||
cpu_set(i, cpu_possible_map);
|
cpu_set(i, cpu_possible_map);
|
||||||
|
|
||||||
|
|
|
@ -1606,11 +1606,19 @@ void pmac_tweak_clock_spreading(int enable)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (macio->type == macio_intrepid) {
|
if (macio->type == macio_intrepid) {
|
||||||
if (enable)
|
struct device_node *clock =
|
||||||
UN_OUT(UNI_N_CLOCK_SPREADING, 2);
|
of_find_node_by_path("/uni-n@f8000000/hw-clock");
|
||||||
else
|
if (clock && get_property(clock, "platform-do-clockspreading",
|
||||||
UN_OUT(UNI_N_CLOCK_SPREADING, 0);
|
NULL)) {
|
||||||
mdelay(40);
|
printk(KERN_INFO "%sabling clock spreading on Intrepid"
|
||||||
|
" ASIC\n", enable ? "En" : "Dis");
|
||||||
|
if (enable)
|
||||||
|
UN_OUT(UNI_N_CLOCK_SPREADING, 2);
|
||||||
|
else
|
||||||
|
UN_OUT(UNI_N_CLOCK_SPREADING, 0);
|
||||||
|
mdelay(40);
|
||||||
|
}
|
||||||
|
of_node_put(clock);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (machine_is_compatible("PowerBook5,2") ||
|
while (machine_is_compatible("PowerBook5,2") ||
|
||||||
|
@ -1680,6 +1688,8 @@ void pmac_tweak_clock_spreading(int enable)
|
||||||
pmac_low_i2c_close(ui2c);
|
pmac_low_i2c_close(ui2c);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
printk(KERN_INFO "%sabling clock spreading on i2c clock chip\n",
|
||||||
|
enable ? "En" : "Dis");
|
||||||
pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
|
pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
|
||||||
rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
|
rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
|
||||||
DBG("write result: %d,", rc);
|
DBG("write result: %d,", rc);
|
||||||
|
|
|
@ -34,7 +34,7 @@ libs-y += arch/sparc/prom/ arch/sparc/lib/
|
||||||
# Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
|
# Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
|
||||||
INIT_Y := $(patsubst %/, %/built-in.o, $(init-y))
|
INIT_Y := $(patsubst %/, %/built-in.o, $(init-y))
|
||||||
CORE_Y := $(core-y)
|
CORE_Y := $(core-y)
|
||||||
CORE_Y += kernel/ mm/ fs/ ipc/ security/ crypto/
|
CORE_Y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
|
||||||
CORE_Y := $(patsubst %/, %/built-in.o, $(CORE_Y))
|
CORE_Y := $(patsubst %/, %/built-in.o, $(CORE_Y))
|
||||||
DRIVERS_Y := $(patsubst %/, %/built-in.o, $(drivers-y))
|
DRIVERS_Y := $(patsubst %/, %/built-in.o, $(drivers-y))
|
||||||
NET_Y := $(patsubst %/, %/built-in.o, $(net-y))
|
NET_Y := $(patsubst %/, %/built-in.o, $(net-y))
|
||||||
|
|
|
@ -66,7 +66,6 @@ int atomic_add_unless(atomic_t *v, int a, int u)
|
||||||
return ret != u;
|
return ret != u;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
|
|
||||||
/* Atomic operations are already serializing */
|
/* Atomic operations are already serializing */
|
||||||
void atomic_set(atomic_t *v, int i)
|
void atomic_set(atomic_t *v, int i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,7 +138,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
|
||||||
*/
|
*/
|
||||||
save_previous_kprobe(kcb);
|
save_previous_kprobe(kcb);
|
||||||
set_current_kprobe(p, regs, kcb);
|
set_current_kprobe(p, regs, kcb);
|
||||||
p->nmissed++;
|
kprobes_inc_nmissed_count(p);
|
||||||
kcb->kprobe_status = KPROBE_REENTER;
|
kcb->kprobe_status = KPROBE_REENTER;
|
||||||
prepare_singlestep(p, regs, kcb);
|
prepare_singlestep(p, regs, kcb);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#include "uaccess-skas.h"
|
#include "uaccess-skas.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "asm/fixmap.h"
|
||||||
|
|
||||||
#define __under_task_size(addr, size) \
|
#define __under_task_size(addr, size) \
|
||||||
(((unsigned long) (addr) < TASK_SIZE) && \
|
(((unsigned long) (addr) < TASK_SIZE) && \
|
||||||
(((unsigned long) (addr) + (size)) < TASK_SIZE))
|
(((unsigned long) (addr) + (size)) < TASK_SIZE))
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#define __SKAS_UACCESS_H
|
#define __SKAS_UACCESS_H
|
||||||
|
|
||||||
#include "asm/errno.h"
|
#include "asm/errno.h"
|
||||||
#include "asm/fixmap.h"
|
|
||||||
|
|
||||||
/* No SKAS-specific checking. */
|
/* No SKAS-specific checking. */
|
||||||
#define access_ok_skas(type, addr, size) 0
|
#define access_ok_skas(type, addr, size) 0
|
||||||
|
|
|
@ -217,8 +217,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr
|
||||||
if (!tsk_used_math(tsk))
|
if (!tsk_used_math(tsk))
|
||||||
return 0;
|
return 0;
|
||||||
if (!regs)
|
if (!regs)
|
||||||
regs = (struct pt_regs *)tsk->thread.rsp0;
|
regs = ((struct pt_regs *)tsk->thread.rsp0) - 1;
|
||||||
--regs;
|
|
||||||
if (tsk == current)
|
if (tsk == current)
|
||||||
unlazy_fpu(tsk);
|
unlazy_fpu(tsk);
|
||||||
set_fs(KERNEL_DS);
|
set_fs(KERNEL_DS);
|
||||||
|
|
|
@ -329,7 +329,7 @@ int __kprobes kprobe_handler(struct pt_regs *regs)
|
||||||
*/
|
*/
|
||||||
save_previous_kprobe(kcb);
|
save_previous_kprobe(kcb);
|
||||||
set_current_kprobe(p, regs, kcb);
|
set_current_kprobe(p, regs, kcb);
|
||||||
p->nmissed++;
|
kprobes_inc_nmissed_count(p);
|
||||||
prepare_singlestep(p, regs);
|
prepare_singlestep(p, regs);
|
||||||
kcb->kprobe_status = KPROBE_REENTER;
|
kcb->kprobe_status = KPROBE_REENTER;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -1181,7 +1181,7 @@ int __cpu_disable(void)
|
||||||
if (cpu == 0)
|
if (cpu == 0)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
disable_APIC_timer();
|
clear_local_APIC();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HACK:
|
* HACK:
|
||||||
|
|
|
@ -59,7 +59,7 @@ static int notsc __initdata = 0;
|
||||||
unsigned int cpu_khz; /* TSC clocks / usec, not used here */
|
unsigned int cpu_khz; /* TSC clocks / usec, not used here */
|
||||||
static unsigned long hpet_period; /* fsecs / HPET clock */
|
static unsigned long hpet_period; /* fsecs / HPET clock */
|
||||||
unsigned long hpet_tick; /* HPET clocks / interrupt */
|
unsigned long hpet_tick; /* HPET clocks / interrupt */
|
||||||
static int hpet_use_timer;
|
static int hpet_use_timer; /* Use counter of hpet for time keeping, otherwise PIT */
|
||||||
unsigned long vxtime_hz = PIT_TICK_RATE;
|
unsigned long vxtime_hz = PIT_TICK_RATE;
|
||||||
int report_lost_ticks; /* command line option */
|
int report_lost_ticks; /* command line option */
|
||||||
unsigned long long monotonic_base;
|
unsigned long long monotonic_base;
|
||||||
|
@ -908,12 +908,14 @@ void __init time_init(void)
|
||||||
if (!hpet_init())
|
if (!hpet_init())
|
||||||
vxtime_hz = (1000000000000000L + hpet_period / 2) /
|
vxtime_hz = (1000000000000000L + hpet_period / 2) /
|
||||||
hpet_period;
|
hpet_period;
|
||||||
|
else
|
||||||
|
vxtime.hpet_address = 0;
|
||||||
|
|
||||||
if (hpet_use_timer) {
|
if (hpet_use_timer) {
|
||||||
cpu_khz = hpet_calibrate_tsc();
|
cpu_khz = hpet_calibrate_tsc();
|
||||||
timename = "HPET";
|
timename = "HPET";
|
||||||
#ifdef CONFIG_X86_PM_TIMER
|
#ifdef CONFIG_X86_PM_TIMER
|
||||||
} else if (pmtmr_ioport) {
|
} else if (pmtmr_ioport && !vxtime.hpet_address) {
|
||||||
vxtime_hz = PM_TIMER_FREQUENCY;
|
vxtime_hz = PM_TIMER_FREQUENCY;
|
||||||
timename = "PM";
|
timename = "PM";
|
||||||
pit_init();
|
pit_init();
|
||||||
|
|
|
@ -247,9 +247,15 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
|
||||||
return __ioremap(phys_addr, size, _PAGE_PCD);
|
return __ioremap(phys_addr, size, _PAGE_PCD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* iounmap - Free a IO remapping
|
||||||
|
* @addr: virtual address from ioremap_*
|
||||||
|
*
|
||||||
|
* Caller must ensure there is only one unmapping for the same pointer.
|
||||||
|
*/
|
||||||
void iounmap(volatile void __iomem *addr)
|
void iounmap(volatile void __iomem *addr)
|
||||||
{
|
{
|
||||||
struct vm_struct *p;
|
struct vm_struct *p, *o;
|
||||||
|
|
||||||
if (addr <= high_memory)
|
if (addr <= high_memory)
|
||||||
return;
|
return;
|
||||||
|
@ -257,12 +263,31 @@ void iounmap(volatile void __iomem *addr)
|
||||||
addr < phys_to_virt(ISA_END_ADDRESS))
|
addr < phys_to_virt(ISA_END_ADDRESS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
write_lock(&vmlist_lock);
|
addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr);
|
||||||
p = __remove_vm_area((void *)((unsigned long)addr & PAGE_MASK));
|
/* Use the vm area unlocked, assuming the caller
|
||||||
if (!p)
|
ensures there isn't another iounmap for the same address
|
||||||
|
in parallel. Reuse of the virtual address is prevented by
|
||||||
|
leaving it in the global lists until we're done with it.
|
||||||
|
cpa takes care of the direct mappings. */
|
||||||
|
read_lock(&vmlist_lock);
|
||||||
|
for (p = vmlist; p; p = p->next) {
|
||||||
|
if (p->addr == addr)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
read_unlock(&vmlist_lock);
|
||||||
|
|
||||||
|
if (!p) {
|
||||||
printk("iounmap: bad address %p\n", addr);
|
printk("iounmap: bad address %p\n", addr);
|
||||||
else if (p->flags >> 20)
|
dump_stack();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reset the direct mapping. Can block */
|
||||||
|
if (p->flags >> 20)
|
||||||
ioremap_change_attr(p->phys_addr, p->size, 0);
|
ioremap_change_attr(p->phys_addr, p->size, 0);
|
||||||
write_unlock(&vmlist_lock);
|
|
||||||
|
/* Finally remove it */
|
||||||
|
o = remove_vm_area((void *)addr);
|
||||||
|
BUG_ON(p != o || o == NULL);
|
||||||
kfree(p);
|
kfree(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,8 @@ static int __init populate_memnodemap(
|
||||||
int res = -1;
|
int res = -1;
|
||||||
unsigned long addr, end;
|
unsigned long addr, end;
|
||||||
|
|
||||||
|
if (shift >= 64)
|
||||||
|
return -1;
|
||||||
memset(memnodemap, 0xff, sizeof(memnodemap));
|
memset(memnodemap, 0xff, sizeof(memnodemap));
|
||||||
for (i = 0; i < numnodes; i++) {
|
for (i = 0; i < numnodes; i++) {
|
||||||
addr = nodes[i].start;
|
addr = nodes[i].start;
|
||||||
|
@ -65,7 +67,7 @@ static int __init populate_memnodemap(
|
||||||
if (memnodemap[addr >> shift] != 0xff)
|
if (memnodemap[addr >> shift] != 0xff)
|
||||||
return -1;
|
return -1;
|
||||||
memnodemap[addr >> shift] = i;
|
memnodemap[addr >> shift] = i;
|
||||||
addr += (1 << shift);
|
addr += (1UL << shift);
|
||||||
} while (addr < end);
|
} while (addr < end);
|
||||||
res = 1;
|
res = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,13 @@
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/acpi.h>
|
#include <linux/acpi.h>
|
||||||
|
#include <linux/bitmap.h>
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
|
|
||||||
#define MMCONFIG_APER_SIZE (256*1024*1024)
|
#define MMCONFIG_APER_SIZE (256*1024*1024)
|
||||||
|
|
||||||
|
static DECLARE_BITMAP(fallback_slots, 32);
|
||||||
|
|
||||||
/* Static virtual mapping of the MMCONFIG aperture */
|
/* Static virtual mapping of the MMCONFIG aperture */
|
||||||
struct mmcfg_virt {
|
struct mmcfg_virt {
|
||||||
struct acpi_table_mcfg_config *cfg;
|
struct acpi_table_mcfg_config *cfg;
|
||||||
|
@ -19,7 +22,7 @@ struct mmcfg_virt {
|
||||||
};
|
};
|
||||||
static struct mmcfg_virt *pci_mmcfg_virt;
|
static struct mmcfg_virt *pci_mmcfg_virt;
|
||||||
|
|
||||||
static char *get_virt(unsigned int seg, int bus)
|
static char *get_virt(unsigned int seg, unsigned bus)
|
||||||
{
|
{
|
||||||
int cfg_num = -1;
|
int cfg_num = -1;
|
||||||
struct acpi_table_mcfg_config *cfg;
|
struct acpi_table_mcfg_config *cfg;
|
||||||
|
@ -27,10 +30,9 @@ static char *get_virt(unsigned int seg, int bus)
|
||||||
while (1) {
|
while (1) {
|
||||||
++cfg_num;
|
++cfg_num;
|
||||||
if (cfg_num >= pci_mmcfg_config_num) {
|
if (cfg_num >= pci_mmcfg_config_num) {
|
||||||
/* something bad is going on, no cfg table is found. */
|
/* Not found - fall back to type 1. This happens
|
||||||
/* so we fall back to the old way we used to do this */
|
e.g. on the internal devices of a K8 northbridge. */
|
||||||
/* and just rely on the first entry to be correct. */
|
return NULL;
|
||||||
return pci_mmcfg_virt[0].virt;
|
|
||||||
}
|
}
|
||||||
cfg = pci_mmcfg_virt[cfg_num].cfg;
|
cfg = pci_mmcfg_virt[cfg_num].cfg;
|
||||||
if (cfg->pci_segment_group_number != seg)
|
if (cfg->pci_segment_group_number != seg)
|
||||||
|
@ -41,20 +43,30 @@ static char *get_virt(unsigned int seg, int bus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
|
static char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
|
||||||
{
|
{
|
||||||
|
char *addr;
|
||||||
return get_virt(seg, bus) + ((bus << 20) | (devfn << 12));
|
if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots))
|
||||||
|
return NULL;
|
||||||
|
addr = get_virt(seg, bus);
|
||||||
|
if (!addr)
|
||||||
|
return NULL;
|
||||||
|
return addr + ((bus << 20) | (devfn << 12));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
|
static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
|
||||||
unsigned int devfn, int reg, int len, u32 *value)
|
unsigned int devfn, int reg, int len, u32 *value)
|
||||||
{
|
{
|
||||||
char *addr = pci_dev_base(seg, bus, devfn);
|
char *addr;
|
||||||
|
|
||||||
|
/* Why do we have this when nobody checks it. How about a BUG()!? -AK */
|
||||||
if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095)))
|
if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095)))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
addr = pci_dev_base(seg, bus, devfn);
|
||||||
|
if (!addr)
|
||||||
|
return pci_conf1_read(seg,bus,devfn,reg,len,value);
|
||||||
|
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
*value = readb(addr + reg);
|
*value = readb(addr + reg);
|
||||||
|
@ -73,11 +85,16 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
|
||||||
static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
|
static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
|
||||||
unsigned int devfn, int reg, int len, u32 value)
|
unsigned int devfn, int reg, int len, u32 value)
|
||||||
{
|
{
|
||||||
char *addr = pci_dev_base(seg, bus, devfn);
|
char *addr;
|
||||||
|
|
||||||
|
/* Why do we have this when nobody checks it. How about a BUG()!? -AK */
|
||||||
if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
|
if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
addr = pci_dev_base(seg, bus, devfn);
|
||||||
|
if (!addr)
|
||||||
|
return pci_conf1_write(seg,bus,devfn,reg,len,value);
|
||||||
|
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 1:
|
case 1:
|
||||||
writeb(value, addr + reg);
|
writeb(value, addr + reg);
|
||||||
|
@ -98,6 +115,30 @@ static struct pci_raw_ops pci_mmcfg = {
|
||||||
.write = pci_mmcfg_write,
|
.write = pci_mmcfg_write,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* K8 systems have some devices (typically in the builtin northbridge)
|
||||||
|
that are only accessible using type1
|
||||||
|
Normally this can be expressed in the MCFG by not listing them
|
||||||
|
and assigning suitable _SEGs, but this isn't implemented in some BIOS.
|
||||||
|
Instead try to discover all devices on bus 0 that are unreachable using MM
|
||||||
|
and fallback for them.
|
||||||
|
We only do this for bus 0/seg 0 */
|
||||||
|
static __init void unreachable_devices(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < 32; i++) {
|
||||||
|
u32 val1;
|
||||||
|
char *addr;
|
||||||
|
|
||||||
|
pci_conf1_read(0, 0, PCI_DEVFN(i,0), 0, 4, &val1);
|
||||||
|
if (val1 == 0xffffffff)
|
||||||
|
continue;
|
||||||
|
addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0));
|
||||||
|
if (addr == NULL|| readl(addr) != val1) {
|
||||||
|
set_bit(i, &fallback_slots);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int __init pci_mmcfg_init(void)
|
static int __init pci_mmcfg_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -128,6 +169,8 @@ static int __init pci_mmcfg_init(void)
|
||||||
printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);
|
printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unreachable_devices();
|
||||||
|
|
||||||
raw_pci_ops = &pci_mmcfg;
|
raw_pci_ops = &pci_mmcfg;
|
||||||
pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
|
pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
|
||||||
if (!link || !irq)
|
if (!link || !irq)
|
||||||
return_VALUE(-EINVAL);
|
return_VALUE(-EINVAL);
|
||||||
|
|
||||||
resource = kmalloc(sizeof(*resource) + 1, GFP_KERNEL);
|
resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
|
||||||
if (!resource)
|
if (!resource)
|
||||||
return_VALUE(-ENOMEM);
|
return_VALUE(-ENOMEM);
|
||||||
|
|
||||||
|
|
|
@ -1146,7 +1146,6 @@ static int revalidate_allvol(ctlr_info_t *host)
|
||||||
del_gendisk(disk);
|
del_gendisk(disk);
|
||||||
if (q)
|
if (q)
|
||||||
blk_cleanup_queue(q);
|
blk_cleanup_queue(q);
|
||||||
put_disk(disk);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1465,9 +1464,10 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
|
||||||
request_queue_t *q = disk->queue;
|
request_queue_t *q = disk->queue;
|
||||||
if (disk->flags & GENHD_FL_UP)
|
if (disk->flags & GENHD_FL_UP)
|
||||||
del_gendisk(disk);
|
del_gendisk(disk);
|
||||||
if (q)
|
if (q) {
|
||||||
blk_cleanup_queue(q);
|
blk_cleanup_queue(q);
|
||||||
put_disk(disk);
|
drv->queue = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3243,7 +3243,6 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
|
||||||
del_gendisk(disk);
|
del_gendisk(disk);
|
||||||
if (q)
|
if (q)
|
||||||
blk_cleanup_queue(q);
|
blk_cleanup_queue(q);
|
||||||
put_disk(disk);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -943,6 +943,15 @@ config RAW_DRIVER
|
||||||
Applications should simply open the device (eg /dev/hda1)
|
Applications should simply open the device (eg /dev/hda1)
|
||||||
with the O_DIRECT flag.
|
with the O_DIRECT flag.
|
||||||
|
|
||||||
|
config MAX_RAW_DEVS
|
||||||
|
int "Maximum number of RAW devices to support (1-8192)"
|
||||||
|
depends on RAW_DRIVER
|
||||||
|
default "256"
|
||||||
|
help
|
||||||
|
The maximum number of RAW devices that are supported.
|
||||||
|
Default is 256. Increase this number in case you need lots of
|
||||||
|
raw devices.
|
||||||
|
|
||||||
config HPET
|
config HPET
|
||||||
bool "HPET - High Precision Event Timer" if (X86 || IA64)
|
bool "HPET - High Precision Event Timer" if (X86 || IA64)
|
||||||
default n
|
default n
|
||||||
|
@ -974,15 +983,6 @@ config HPET_MMAP
|
||||||
exposed to the user. If this applies to your hardware,
|
exposed to the user. If this applies to your hardware,
|
||||||
say N here.
|
say N here.
|
||||||
|
|
||||||
config MAX_RAW_DEVS
|
|
||||||
int "Maximum number of RAW devices to support (1-8192)"
|
|
||||||
depends on RAW_DRIVER
|
|
||||||
default "256"
|
|
||||||
help
|
|
||||||
The maximum number of RAW devices that are supported.
|
|
||||||
Default is 256. Increase this number in case you need lots of
|
|
||||||
raw devices.
|
|
||||||
|
|
||||||
config HANGCHECK_TIMER
|
config HANGCHECK_TIMER
|
||||||
tristate "Hangcheck timer"
|
tristate "Hangcheck timer"
|
||||||
depends on X86 || IA64 || PPC64 || ARCH_S390
|
depends on X86 || IA64 || PPC64 || ARCH_S390
|
||||||
|
|
|
@ -1522,7 +1522,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
|
||||||
|
|
||||||
dev_priv->gart_size = init->gart_size;
|
dev_priv->gart_size = init->gart_size;
|
||||||
dev_priv->gart_vm_start = dev_priv->fb_location
|
dev_priv->gart_vm_start = dev_priv->fb_location
|
||||||
+ RADEON_READ(RADEON_CONFIG_APER_SIZE);
|
+ RADEON_READ(RADEON_CONFIG_APER_SIZE) * 2;
|
||||||
|
|
||||||
#if __OS_HAS_AGP
|
#if __OS_HAS_AGP
|
||||||
if (!dev_priv->is_pci)
|
if (!dev_priv->is_pci)
|
||||||
|
|
|
@ -2986,7 +2986,7 @@ static void send_panic_events(char *str)
|
||||||
msg.cmd = 2; /* Platform event command. */
|
msg.cmd = 2; /* Platform event command. */
|
||||||
msg.data = data;
|
msg.data = data;
|
||||||
msg.data_len = 8;
|
msg.data_len = 8;
|
||||||
data[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */
|
data[0] = 0x41; /* Kernel generator ID, IPMI table 5-4 */
|
||||||
data[1] = 0x03; /* This is for IPMI 1.0. */
|
data[1] = 0x03; /* This is for IPMI 1.0. */
|
||||||
data[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */
|
data[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */
|
||||||
data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */
|
data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */
|
||||||
|
|
|
@ -180,10 +180,6 @@ static ssize_t mpcore_wdt_write(struct file *file, const char *data, size_t len,
|
||||||
{
|
{
|
||||||
struct mpcore_wdt *wdt = file->private_data;
|
struct mpcore_wdt *wdt = file->private_data;
|
||||||
|
|
||||||
/* Can't seek (pwrite) on this device */
|
|
||||||
if (ppos != &file->f_pos)
|
|
||||||
return -ESPIPE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Refresh the timer.
|
* Refresh the timer.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -56,6 +56,7 @@ void proc_fork_connector(struct task_struct *task)
|
||||||
msg = (struct cn_msg*)buffer;
|
msg = (struct cn_msg*)buffer;
|
||||||
ev = (struct proc_event*)msg->data;
|
ev = (struct proc_event*)msg->data;
|
||||||
get_seq(&msg->seq, &ev->cpu);
|
get_seq(&msg->seq, &ev->cpu);
|
||||||
|
getnstimestamp(&ev->timestamp);
|
||||||
ev->what = PROC_EVENT_FORK;
|
ev->what = PROC_EVENT_FORK;
|
||||||
ev->event_data.fork.parent_pid = task->real_parent->pid;
|
ev->event_data.fork.parent_pid = task->real_parent->pid;
|
||||||
ev->event_data.fork.parent_tgid = task->real_parent->tgid;
|
ev->event_data.fork.parent_tgid = task->real_parent->tgid;
|
||||||
|
@ -81,6 +82,7 @@ void proc_exec_connector(struct task_struct *task)
|
||||||
msg = (struct cn_msg*)buffer;
|
msg = (struct cn_msg*)buffer;
|
||||||
ev = (struct proc_event*)msg->data;
|
ev = (struct proc_event*)msg->data;
|
||||||
get_seq(&msg->seq, &ev->cpu);
|
get_seq(&msg->seq, &ev->cpu);
|
||||||
|
getnstimestamp(&ev->timestamp);
|
||||||
ev->what = PROC_EVENT_EXEC;
|
ev->what = PROC_EVENT_EXEC;
|
||||||
ev->event_data.exec.process_pid = task->pid;
|
ev->event_data.exec.process_pid = task->pid;
|
||||||
ev->event_data.exec.process_tgid = task->tgid;
|
ev->event_data.exec.process_tgid = task->tgid;
|
||||||
|
@ -114,6 +116,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
|
||||||
} else
|
} else
|
||||||
return;
|
return;
|
||||||
get_seq(&msg->seq, &ev->cpu);
|
get_seq(&msg->seq, &ev->cpu);
|
||||||
|
getnstimestamp(&ev->timestamp);
|
||||||
|
|
||||||
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
|
||||||
msg->ack = 0; /* not used */
|
msg->ack = 0; /* not used */
|
||||||
|
@ -133,6 +136,7 @@ void proc_exit_connector(struct task_struct *task)
|
||||||
msg = (struct cn_msg*)buffer;
|
msg = (struct cn_msg*)buffer;
|
||||||
ev = (struct proc_event*)msg->data;
|
ev = (struct proc_event*)msg->data;
|
||||||
get_seq(&msg->seq, &ev->cpu);
|
get_seq(&msg->seq, &ev->cpu);
|
||||||
|
getnstimestamp(&ev->timestamp);
|
||||||
ev->what = PROC_EVENT_EXIT;
|
ev->what = PROC_EVENT_EXIT;
|
||||||
ev->event_data.exit.process_pid = task->pid;
|
ev->event_data.exit.process_pid = task->pid;
|
||||||
ev->event_data.exit.process_tgid = task->tgid;
|
ev->event_data.exit.process_tgid = task->tgid;
|
||||||
|
@ -165,6 +169,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
|
||||||
msg = (struct cn_msg*)buffer;
|
msg = (struct cn_msg*)buffer;
|
||||||
ev = (struct proc_event*)msg->data;
|
ev = (struct proc_event*)msg->data;
|
||||||
msg->seq = rcvd_seq;
|
msg->seq = rcvd_seq;
|
||||||
|
getnstimestamp(&ev->timestamp);
|
||||||
ev->cpu = -1;
|
ev->cpu = -1;
|
||||||
ev->what = PROC_EVENT_NONE;
|
ev->what = PROC_EVENT_NONE;
|
||||||
ev->event_data.ack.err = err;
|
ev->event_data.ack.err = err;
|
||||||
|
|
|
@ -207,7 +207,7 @@ static struct wf_smu_sys_fans_param wf_smu_sys_all_params[] = {
|
||||||
},
|
},
|
||||||
/* Model ID 3 */
|
/* Model ID 3 */
|
||||||
{
|
{
|
||||||
.model_id = 2,
|
.model_id = 3,
|
||||||
.itarget = 0x350000,
|
.itarget = 0x350000,
|
||||||
.gd = 0x08e00000,
|
.gd = 0x08e00000,
|
||||||
.gp = 0x00566666,
|
.gp = 0x00566666,
|
||||||
|
@ -219,7 +219,7 @@ static struct wf_smu_sys_fans_param wf_smu_sys_all_params[] = {
|
||||||
},
|
},
|
||||||
/* Model ID 5 */
|
/* Model ID 5 */
|
||||||
{
|
{
|
||||||
.model_id = 2,
|
.model_id = 5,
|
||||||
.itarget = 0x3a0000,
|
.itarget = 0x3a0000,
|
||||||
.gd = 0x15400000,
|
.gd = 0x15400000,
|
||||||
.gp = 0x00233333,
|
.gp = 0x00233333,
|
||||||
|
|
|
@ -320,7 +320,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
|
||||||
* this branch is our 'one mirror IO has finished' event handler:
|
* this branch is our 'one mirror IO has finished' event handler:
|
||||||
*/
|
*/
|
||||||
r1_bio->bios[mirror] = NULL;
|
r1_bio->bios[mirror] = NULL;
|
||||||
bio_put(bio);
|
|
||||||
if (!uptodate) {
|
if (!uptodate) {
|
||||||
md_error(r1_bio->mddev, conf->mirrors[mirror].rdev);
|
md_error(r1_bio->mddev, conf->mirrors[mirror].rdev);
|
||||||
/* an I/O failed, we can't clear the bitmap */
|
/* an I/O failed, we can't clear the bitmap */
|
||||||
|
@ -377,7 +376,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
|
||||||
}
|
}
|
||||||
if (test_bit(R1BIO_BehindIO, &r1_bio->state)) {
|
if (test_bit(R1BIO_BehindIO, &r1_bio->state)) {
|
||||||
/* free extra copy of the data pages */
|
/* free extra copy of the data pages */
|
||||||
/* FIXME bio has been freed!!! */
|
|
||||||
int i = bio->bi_vcnt;
|
int i = bio->bi_vcnt;
|
||||||
while (i--)
|
while (i--)
|
||||||
__free_page(bio->bi_io_vec[i].bv_page);
|
__free_page(bio->bi_io_vec[i].bv_page);
|
||||||
|
@ -391,6 +389,9 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
|
||||||
raid_end_bio_io(r1_bio);
|
raid_end_bio_io(r1_bio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (r1_bio->bios[mirror]==NULL)
|
||||||
|
bio_put(bio);
|
||||||
|
|
||||||
rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
|
rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ static inline void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
|
||||||
list_add_tail(&sh->lru, &conf->inactive_list);
|
list_add_tail(&sh->lru, &conf->inactive_list);
|
||||||
atomic_dec(&conf->active_stripes);
|
atomic_dec(&conf->active_stripes);
|
||||||
if (!conf->inactive_blocked ||
|
if (!conf->inactive_blocked ||
|
||||||
atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4))
|
atomic_read(&conf->active_stripes) < (conf->max_nr_stripes*3/4))
|
||||||
wake_up(&conf->wait_for_stripe);
|
wake_up(&conf->wait_for_stripe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,8 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector
|
||||||
conf->inactive_blocked = 1;
|
conf->inactive_blocked = 1;
|
||||||
wait_event_lock_irq(conf->wait_for_stripe,
|
wait_event_lock_irq(conf->wait_for_stripe,
|
||||||
!list_empty(&conf->inactive_list) &&
|
!list_empty(&conf->inactive_list) &&
|
||||||
(atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4)
|
(atomic_read(&conf->active_stripes)
|
||||||
|
< (conf->max_nr_stripes *3/4)
|
||||||
|| !conf->inactive_blocked),
|
|| !conf->inactive_blocked),
|
||||||
conf->device_lock,
|
conf->device_lock,
|
||||||
unplug_slaves(conf->mddev);
|
unplug_slaves(conf->mddev);
|
||||||
|
@ -1917,7 +1918,7 @@ static int run(mddev_t *mddev)
|
||||||
goto abort;
|
goto abort;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memory = conf->max_nr_stripes * (sizeof(struct stripe_head) +
|
memory = conf->max_nr_stripes * (sizeof(struct stripe_head) +
|
||||||
conf->raid_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024;
|
conf->raid_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024;
|
||||||
if (grow_stripes(conf, conf->max_nr_stripes)) {
|
if (grow_stripes(conf, conf->max_nr_stripes)) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
config VIDEO_SAA7146
|
config VIDEO_SAA7146
|
||||||
tristate
|
tristate
|
||||||
select I2C
|
select I2C
|
||||||
|
|
||||||
config VIDEO_SAA7146_VV
|
config VIDEO_SAA7146_VV
|
||||||
tristate
|
tristate
|
||||||
select VIDEO_BUF
|
select VIDEO_BUF
|
||||||
select VIDEO_VIDEOBUF
|
select VIDEO_VIDEOBUF
|
||||||
select VIDEO_SAA7146
|
select VIDEO_SAA7146
|
||||||
|
|
||||||
config VIDEO_VIDEOBUF
|
config VIDEO_VIDEOBUF
|
||||||
tristate
|
tristate
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
saa7146-objs := saa7146_i2c.o saa7146_core.o
|
saa7146-objs := saa7146_i2c.o saa7146_core.o
|
||||||
saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o
|
saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o
|
||||||
|
|
||||||
obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o
|
obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o
|
||||||
obj-$(CONFIG_VIDEO_SAA7146_VV) += saa7146_vv.o
|
obj-$(CONFIG_VIDEO_SAA7146_VV) += saa7146_vv.o
|
||||||
|
|
|
@ -313,6 +313,7 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
|
||||||
if (ir_codes)
|
if (ir_codes)
|
||||||
memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes));
|
memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes));
|
||||||
|
|
||||||
|
|
||||||
dev->keycode = ir->ir_codes;
|
dev->keycode = ir->ir_codes;
|
||||||
dev->keycodesize = sizeof(IR_KEYTAB_TYPE);
|
dev->keycodesize = sizeof(IR_KEYTAB_TYPE);
|
||||||
dev->keycodemax = IR_KEYTAB_SIZE;
|
dev->keycodemax = IR_KEYTAB_SIZE;
|
||||||
|
|
|
@ -174,8 +174,8 @@ void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt)
|
||||||
|
|
||||||
int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
|
int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
|
||||||
{
|
{
|
||||||
u32 *cpu;
|
u32 *cpu;
|
||||||
dma_addr_t dma_addr;
|
dma_addr_t dma_addr;
|
||||||
|
|
||||||
cpu = pci_alloc_consistent(pci, PAGE_SIZE, &dma_addr);
|
cpu = pci_alloc_consistent(pci, PAGE_SIZE, &dma_addr);
|
||||||
if (NULL == cpu) {
|
if (NULL == cpu) {
|
||||||
|
@ -405,7 +405,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
|
||||||
|
|
||||||
pci_set_drvdata(pci, dev);
|
pci_set_drvdata(pci, dev);
|
||||||
|
|
||||||
init_MUTEX(&dev->lock);
|
init_MUTEX(&dev->lock);
|
||||||
spin_lock_init(&dev->int_slock);
|
spin_lock_init(&dev->int_slock);
|
||||||
spin_lock_init(&dev->slock);
|
spin_lock_init(&dev->slock);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <media/saa7146_vv.h>
|
#include <media/saa7146_vv.h>
|
||||||
|
|
||||||
#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
|
#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* resource management functions, shamelessly stolen from saa7134 driver */
|
/* resource management functions, shamelessly stolen from saa7134 driver */
|
||||||
|
@ -102,9 +102,9 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
|
||||||
/* finish current buffer */
|
/* finish current buffer */
|
||||||
if (NULL == q->curr) {
|
if (NULL == q->curr) {
|
||||||
DEB_D(("aiii. no current buffer\n"));
|
DEB_D(("aiii. no current buffer\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
q->curr->vb.state = state;
|
q->curr->vb.state = state;
|
||||||
do_gettimeofday(&q->curr->vb.ts);
|
do_gettimeofday(&q->curr->vb.ts);
|
||||||
wake_up(&q->curr->vb.done);
|
wake_up(&q->curr->vb.done);
|
||||||
|
@ -143,13 +143,13 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
|
||||||
// fixme: fix this for vflip != 0
|
// fixme: fix this for vflip != 0
|
||||||
|
|
||||||
saa7146_write(dev, PROT_ADDR1, 0);
|
saa7146_write(dev, PROT_ADDR1, 0);
|
||||||
saa7146_write(dev, MC2, (MASK_02|MASK_18));
|
saa7146_write(dev, MC2, (MASK_02|MASK_18));
|
||||||
|
|
||||||
/* write the address of the rps-program */
|
/* write the address of the rps-program */
|
||||||
saa7146_write(dev, RPS_ADDR0, dev->d_rps0.dma_handle);
|
saa7146_write(dev, RPS_ADDR0, dev->d_rps0.dma_handle);
|
||||||
/* turn on rps */
|
/* turn on rps */
|
||||||
saa7146_write(dev, MC1, (MASK_12 | MASK_28));
|
saa7146_write(dev, MC1, (MASK_12 | MASK_28));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
printk("vdma%d.base_even: 0x%08x\n", 1,saa7146_read(dev,BASE_EVEN1));
|
printk("vdma%d.base_even: 0x%08x\n", 1,saa7146_read(dev,BASE_EVEN1));
|
||||||
printk("vdma%d.base_odd: 0x%08x\n", 1,saa7146_read(dev,BASE_ODD1));
|
printk("vdma%d.base_odd: 0x%08x\n", 1,saa7146_read(dev,BASE_ODD1));
|
||||||
|
@ -246,7 +246,7 @@ static int fops_open(struct inode *inode, struct file *file)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
memset(fh,0,sizeof(*fh));
|
memset(fh,0,sizeof(*fh));
|
||||||
|
|
||||||
file->private_data = fh;
|
file->private_data = fh;
|
||||||
fh->dev = dev;
|
fh->dev = dev;
|
||||||
fh->type = type;
|
fh->type = type;
|
||||||
|
@ -275,7 +275,7 @@ out:
|
||||||
file->private_data = NULL;
|
file->private_data = NULL;
|
||||||
}
|
}
|
||||||
up(&saa7146_devices_lock);
|
up(&saa7146_devices_lock);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int fops_release(struct inode *inode, struct file *file)
|
static int fops_release(struct inode *inode, struct file *file)
|
||||||
|
@ -405,7 +405,7 @@ static struct file_operations video_fops =
|
||||||
static void vv_callback(struct saa7146_dev *dev, unsigned long status)
|
static void vv_callback(struct saa7146_dev *dev, unsigned long status)
|
||||||
{
|
{
|
||||||
u32 isr = status;
|
u32 isr = status;
|
||||||
|
|
||||||
DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status));
|
DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status));
|
||||||
|
|
||||||
if (0 != (isr & (MASK_27))) {
|
if (0 != (isr & (MASK_27))) {
|
||||||
|
@ -454,11 +454,11 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
|
||||||
handle different devices that might need different
|
handle different devices that might need different
|
||||||
configuration data) */
|
configuration data) */
|
||||||
dev->ext_vv_data = ext_vv;
|
dev->ext_vv_data = ext_vv;
|
||||||
|
|
||||||
vv->video_minor = -1;
|
vv->video_minor = -1;
|
||||||
vv->vbi_minor = -1;
|
vv->vbi_minor = -1;
|
||||||
|
|
||||||
vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
|
vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
|
||||||
if( NULL == vv->d_clipping.cpu_addr ) {
|
if( NULL == vv->d_clipping.cpu_addr ) {
|
||||||
ERR(("out of memory. aborting.\n"));
|
ERR(("out of memory. aborting.\n"));
|
||||||
kfree(vv);
|
kfree(vv);
|
||||||
|
@ -468,7 +468,7 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
|
||||||
|
|
||||||
saa7146_video_uops.init(dev,vv);
|
saa7146_video_uops.init(dev,vv);
|
||||||
saa7146_vbi_uops.init(dev,vv);
|
saa7146_vbi_uops.init(dev,vv);
|
||||||
|
|
||||||
dev->vv_data = vv;
|
dev->vv_data = vv;
|
||||||
dev->vv_callback = &vv_callback;
|
dev->vv_callback = &vv_callback;
|
||||||
|
|
||||||
|
@ -480,12 +480,12 @@ int saa7146_vv_release(struct saa7146_dev* dev)
|
||||||
struct saa7146_vv *vv = dev->vv_data;
|
struct saa7146_vv *vv = dev->vv_data;
|
||||||
|
|
||||||
DEB_EE(("dev:%p\n",dev));
|
DEB_EE(("dev:%p\n",dev));
|
||||||
|
|
||||||
pci_free_consistent(dev->pci, SAA7146_RPS_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
|
pci_free_consistent(dev->pci, SAA7146_RPS_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
|
||||||
kfree(vv);
|
kfree(vv);
|
||||||
dev->vv_data = NULL;
|
dev->vv_data = NULL;
|
||||||
dev->vv_callback = NULL;
|
dev->vv_callback = NULL;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -498,7 +498,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
|
||||||
DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type));
|
DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type));
|
||||||
|
|
||||||
// released by vfd->release
|
// released by vfd->release
|
||||||
vfd = video_device_alloc();
|
vfd = video_device_alloc();
|
||||||
if (vfd == NULL)
|
if (vfd == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
|
||||||
int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev)
|
int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev)
|
||||||
{
|
{
|
||||||
struct saa7146_vv *vv = dev->vv_data;
|
struct saa7146_vv *vv = dev->vv_data;
|
||||||
|
|
||||||
DEB_EE(("dev:%p\n",dev));
|
DEB_EE(("dev:%p\n",dev));
|
||||||
|
|
||||||
if( VFL_TYPE_GRABBER == (*vid)->type ) {
|
if( VFL_TYPE_GRABBER == (*vid)->type ) {
|
||||||
|
|
|
@ -276,8 +276,8 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
|
||||||
int i = 0, count = 0;
|
int i = 0, count = 0;
|
||||||
u32* buffer = dev->d_i2c.cpu_addr;
|
u32* buffer = dev->d_i2c.cpu_addr;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
int address_err = 0;
|
int address_err = 0;
|
||||||
int short_delay = 0;
|
int short_delay = 0;
|
||||||
|
|
||||||
if (down_interruptible (&dev->i2c_lock))
|
if (down_interruptible (&dev->i2c_lock))
|
||||||
return -ERESTARTSYS;
|
return -ERESTARTSYS;
|
||||||
|
@ -325,7 +325,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
|
||||||
if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) {
|
if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
address_err++;
|
address_err++;
|
||||||
}
|
}
|
||||||
DEB_I2C(("error while sending message(s). starting again.\n"));
|
DEB_I2C(("error while sending message(s). starting again.\n"));
|
||||||
break;
|
break;
|
||||||
|
@ -336,14 +336,14 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* delay a bit before retrying */
|
/* delay a bit before retrying */
|
||||||
msleep(10);
|
msleep(10);
|
||||||
|
|
||||||
} while (err != num && retries--);
|
} while (err != num && retries--);
|
||||||
|
|
||||||
/* if every retry had an address error, exit right away */
|
/* if every retry had an address error, exit right away */
|
||||||
if (address_err == retries) {
|
if (address_err == retries) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if any things had to be read, get the results */
|
/* if any things had to be read, get the results */
|
||||||
|
|
|
@ -6,8 +6,8 @@ static int vbi_workaround(struct saa7146_dev *dev)
|
||||||
{
|
{
|
||||||
struct saa7146_vv *vv = dev->vv_data;
|
struct saa7146_vv *vv = dev->vv_data;
|
||||||
|
|
||||||
u32 *cpu;
|
u32 *cpu;
|
||||||
dma_addr_t dma_addr;
|
dma_addr_t dma_addr;
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -150,23 +150,23 @@ static int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
|
||||||
maxh = vv->standard->v_max_out;
|
maxh = vv->standard->v_max_out;
|
||||||
|
|
||||||
if (V4L2_FIELD_ANY == field) {
|
if (V4L2_FIELD_ANY == field) {
|
||||||
field = (win->w.height > maxh/2)
|
field = (win->w.height > maxh/2)
|
||||||
? V4L2_FIELD_INTERLACED
|
? V4L2_FIELD_INTERLACED
|
||||||
: V4L2_FIELD_TOP;
|
: V4L2_FIELD_TOP;
|
||||||
}
|
}
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case V4L2_FIELD_TOP:
|
case V4L2_FIELD_TOP:
|
||||||
case V4L2_FIELD_BOTTOM:
|
case V4L2_FIELD_BOTTOM:
|
||||||
case V4L2_FIELD_ALTERNATE:
|
case V4L2_FIELD_ALTERNATE:
|
||||||
maxh = maxh / 2;
|
maxh = maxh / 2;
|
||||||
break;
|
break;
|
||||||
case V4L2_FIELD_INTERLACED:
|
case V4L2_FIELD_INTERLACED:
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
DEB_D(("no known field mode '%d'.\n",field));
|
DEB_D(("no known field mode '%d'.\n",field));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
win->field = field;
|
win->field = field;
|
||||||
if (win->w.width > maxw)
|
if (win->w.width > maxw)
|
||||||
|
@ -887,7 +887,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
|
||||||
|
|
||||||
DEB_EE(("VIDIOC_QUERYCAP\n"));
|
DEB_EE(("VIDIOC_QUERYCAP\n"));
|
||||||
|
|
||||||
strcpy(cap->driver, "saa7146 v4l2");
|
strcpy(cap->driver, "saa7146 v4l2");
|
||||||
strlcpy(cap->card, dev->ext->name, sizeof(cap->card));
|
strlcpy(cap->card, dev->ext->name, sizeof(cap->card));
|
||||||
sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
|
sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
|
||||||
cap->version = SAA7146_VERSION_CODE;
|
cap->version = SAA7146_VERSION_CODE;
|
||||||
|
@ -1011,19 +1011,19 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
|
||||||
err = set_control(fh,arg);
|
err = set_control(fh,arg);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
case VIDIOC_G_PARM:
|
case VIDIOC_G_PARM:
|
||||||
{
|
{
|
||||||
struct v4l2_streamparm *parm = arg;
|
struct v4l2_streamparm *parm = arg;
|
||||||
if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) {
|
if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));
|
memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));
|
||||||
parm->parm.capture.readbuffers = 1;
|
parm->parm.capture.readbuffers = 1;
|
||||||
// fixme: only for PAL!
|
// fixme: only for PAL!
|
||||||
parm->parm.capture.timeperframe.numerator = 1;
|
parm->parm.capture.timeperframe.numerator = 1;
|
||||||
parm->parm.capture.timeperframe.denominator = 25;
|
parm->parm.capture.timeperframe.denominator = 25;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case VIDIOC_G_FMT:
|
case VIDIOC_G_FMT:
|
||||||
{
|
{
|
||||||
struct v4l2_format *f = arg;
|
struct v4l2_format *f = arg;
|
||||||
|
@ -1383,7 +1383,7 @@ static struct videobuf_queue_ops video_qops = {
|
||||||
|
|
||||||
static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
|
static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
|
||||||
{
|
{
|
||||||
INIT_LIST_HEAD(&vv->video_q.queue);
|
INIT_LIST_HEAD(&vv->video_q.queue);
|
||||||
|
|
||||||
init_timer(&vv->video_q.timeout);
|
init_timer(&vv->video_q.timeout);
|
||||||
vv->video_q.timeout.function = saa7146_buffer_timeout;
|
vv->video_q.timeout.function = saa7146_buffer_timeout;
|
||||||
|
|
|
@ -132,7 +132,7 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device *fc, int extended);
|
||||||
* I2C-channel of the flexcop.
|
* I2C-channel of the flexcop.
|
||||||
*/
|
*/
|
||||||
int flexcop_i2c_request(struct flexcop_device*, flexcop_access_op_t,
|
int flexcop_i2c_request(struct flexcop_device*, flexcop_access_op_t,
|
||||||
flexcop_i2c_port_t, u8 chipaddr, u8 addr, u8 *buf, u16 len);
|
flexcop_i2c_port_t, u8 chipaddr, u8 addr, u8 *buf, u16 len);
|
||||||
|
|
||||||
/* from flexcop-sram.c */
|
/* from flexcop-sram.c */
|
||||||
int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, flexcop_sram_dest_target_t target);
|
int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, flexcop_sram_dest_target_t target);
|
||||||
|
|
|
@ -298,7 +298,7 @@ static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct fir
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lgdt3303_pll_set(struct dvb_frontend* fe,
|
static int lgdt3303_pll_set(struct dvb_frontend* fe,
|
||||||
struct dvb_frontend_parameters* params)
|
struct dvb_frontend_parameters* params)
|
||||||
{
|
{
|
||||||
struct flexcop_device *fc = fe->dvb->priv;
|
struct flexcop_device *fc = fe->dvb->priv;
|
||||||
u8 buf[4];
|
u8 buf[4];
|
||||||
|
@ -332,7 +332,7 @@ static int lgdt3303_pll_set(struct dvb_frontend* fe,
|
||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct lgdt330x_config air2pc_atsc_hd5000_config = {
|
static struct lgdt330x_config air2pc_atsc_hd5000_config = {
|
||||||
|
|
|
@ -556,9 +556,9 @@ static int tdvs_tua6034_pll_set(struct dvb_frontend* fe, struct dvb_frontend_par
|
||||||
dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
|
dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
|
||||||
__FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
|
__FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
|
||||||
if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) {
|
if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) {
|
||||||
printk(KERN_WARNING "dvb-bt8xx: %s error "
|
printk(KERN_WARNING "dvb-bt8xx: %s error "
|
||||||
"(addr %02x <- %02x, err = %i)\n",
|
"(addr %02x <- %02x, err = %i)\n",
|
||||||
__FUNCTION__, buf[0], buf[1], err);
|
__FUNCTION__, buf[0], buf[1], err);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
else
|
else
|
||||||
|
|
|
@ -86,25 +86,25 @@ enum dmx_success {
|
||||||
|
|
||||||
enum dmx_ts_pes
|
enum dmx_ts_pes
|
||||||
{ /* also send packets to decoder (if it exists) */
|
{ /* also send packets to decoder (if it exists) */
|
||||||
DMX_TS_PES_AUDIO0,
|
DMX_TS_PES_AUDIO0,
|
||||||
DMX_TS_PES_VIDEO0,
|
DMX_TS_PES_VIDEO0,
|
||||||
DMX_TS_PES_TELETEXT0,
|
DMX_TS_PES_TELETEXT0,
|
||||||
DMX_TS_PES_SUBTITLE0,
|
DMX_TS_PES_SUBTITLE0,
|
||||||
DMX_TS_PES_PCR0,
|
DMX_TS_PES_PCR0,
|
||||||
|
|
||||||
DMX_TS_PES_AUDIO1,
|
DMX_TS_PES_AUDIO1,
|
||||||
DMX_TS_PES_VIDEO1,
|
DMX_TS_PES_VIDEO1,
|
||||||
DMX_TS_PES_TELETEXT1,
|
DMX_TS_PES_TELETEXT1,
|
||||||
DMX_TS_PES_SUBTITLE1,
|
DMX_TS_PES_SUBTITLE1,
|
||||||
DMX_TS_PES_PCR1,
|
DMX_TS_PES_PCR1,
|
||||||
|
|
||||||
DMX_TS_PES_AUDIO2,
|
DMX_TS_PES_AUDIO2,
|
||||||
DMX_TS_PES_VIDEO2,
|
DMX_TS_PES_VIDEO2,
|
||||||
DMX_TS_PES_TELETEXT2,
|
DMX_TS_PES_TELETEXT2,
|
||||||
DMX_TS_PES_SUBTITLE2,
|
DMX_TS_PES_SUBTITLE2,
|
||||||
DMX_TS_PES_PCR2,
|
DMX_TS_PES_PCR2,
|
||||||
|
|
||||||
DMX_TS_PES_AUDIO3,
|
DMX_TS_PES_AUDIO3,
|
||||||
DMX_TS_PES_VIDEO3,
|
DMX_TS_PES_VIDEO3,
|
||||||
DMX_TS_PES_TELETEXT3,
|
DMX_TS_PES_TELETEXT3,
|
||||||
DMX_TS_PES_SUBTITLE3,
|
DMX_TS_PES_SUBTITLE3,
|
||||||
|
@ -121,17 +121,17 @@ enum dmx_ts_pes
|
||||||
|
|
||||||
|
|
||||||
struct dmx_ts_feed {
|
struct dmx_ts_feed {
|
||||||
int is_filtering; /* Set to non-zero when filtering in progress */
|
int is_filtering; /* Set to non-zero when filtering in progress */
|
||||||
struct dmx_demux *parent; /* Back-pointer */
|
struct dmx_demux *parent; /* Back-pointer */
|
||||||
void *priv; /* Pointer to private data of the API client */
|
void *priv; /* Pointer to private data of the API client */
|
||||||
int (*set) (struct dmx_ts_feed *feed,
|
int (*set) (struct dmx_ts_feed *feed,
|
||||||
u16 pid,
|
u16 pid,
|
||||||
int type,
|
int type,
|
||||||
enum dmx_ts_pes pes_type,
|
enum dmx_ts_pes pes_type,
|
||||||
size_t circular_buffer_size,
|
size_t circular_buffer_size,
|
||||||
struct timespec timeout);
|
struct timespec timeout);
|
||||||
int (*start_filtering) (struct dmx_ts_feed* feed);
|
int (*start_filtering) (struct dmx_ts_feed* feed);
|
||||||
int (*stop_filtering) (struct dmx_ts_feed* feed);
|
int (*stop_filtering) (struct dmx_ts_feed* feed);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
@ -139,35 +139,35 @@ struct dmx_ts_feed {
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
struct dmx_section_filter {
|
struct dmx_section_filter {
|
||||||
u8 filter_value [DMX_MAX_FILTER_SIZE];
|
u8 filter_value [DMX_MAX_FILTER_SIZE];
|
||||||
u8 filter_mask [DMX_MAX_FILTER_SIZE];
|
u8 filter_mask [DMX_MAX_FILTER_SIZE];
|
||||||
u8 filter_mode [DMX_MAX_FILTER_SIZE];
|
u8 filter_mode [DMX_MAX_FILTER_SIZE];
|
||||||
struct dmx_section_feed* parent; /* Back-pointer */
|
struct dmx_section_feed* parent; /* Back-pointer */
|
||||||
void* priv; /* Pointer to private data of the API client */
|
void* priv; /* Pointer to private data of the API client */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dmx_section_feed {
|
struct dmx_section_feed {
|
||||||
int is_filtering; /* Set to non-zero when filtering in progress */
|
int is_filtering; /* Set to non-zero when filtering in progress */
|
||||||
struct dmx_demux* parent; /* Back-pointer */
|
struct dmx_demux* parent; /* Back-pointer */
|
||||||
void* priv; /* Pointer to private data of the API client */
|
void* priv; /* Pointer to private data of the API client */
|
||||||
|
|
||||||
int check_crc;
|
int check_crc;
|
||||||
u32 crc_val;
|
u32 crc_val;
|
||||||
|
|
||||||
u8 *secbuf;
|
u8 *secbuf;
|
||||||
u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
|
u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
|
||||||
u16 secbufp, seclen, tsfeedp;
|
u16 secbufp, seclen, tsfeedp;
|
||||||
|
|
||||||
int (*set) (struct dmx_section_feed* feed,
|
int (*set) (struct dmx_section_feed* feed,
|
||||||
u16 pid,
|
u16 pid,
|
||||||
size_t circular_buffer_size,
|
size_t circular_buffer_size,
|
||||||
int check_crc);
|
int check_crc);
|
||||||
int (*allocate_filter) (struct dmx_section_feed* feed,
|
int (*allocate_filter) (struct dmx_section_feed* feed,
|
||||||
struct dmx_section_filter** filter);
|
struct dmx_section_filter** filter);
|
||||||
int (*release_filter) (struct dmx_section_feed* feed,
|
int (*release_filter) (struct dmx_section_feed* feed,
|
||||||
struct dmx_section_filter* filter);
|
struct dmx_section_filter* filter);
|
||||||
int (*start_filtering) (struct dmx_section_feed* feed);
|
int (*start_filtering) (struct dmx_section_feed* feed);
|
||||||
int (*stop_filtering) (struct dmx_section_feed* feed);
|
int (*stop_filtering) (struct dmx_section_feed* feed);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
@ -205,10 +205,10 @@ enum dmx_frontend_source {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dmx_frontend {
|
struct dmx_frontend {
|
||||||
struct list_head connectivity_list; /* List of front-ends that can
|
struct list_head connectivity_list; /* List of front-ends that can
|
||||||
be connected to a particular
|
be connected to a particular
|
||||||
demux */
|
demux */
|
||||||
enum dmx_frontend_source source;
|
enum dmx_frontend_source source;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
@ -240,38 +240,38 @@ struct dmx_frontend {
|
||||||
#define DMX_FE_ENTRY(list) list_entry(list, struct dmx_frontend, connectivity_list)
|
#define DMX_FE_ENTRY(list) list_entry(list, struct dmx_frontend, connectivity_list)
|
||||||
|
|
||||||
struct dmx_demux {
|
struct dmx_demux {
|
||||||
u32 capabilities; /* Bitfield of capability flags */
|
u32 capabilities; /* Bitfield of capability flags */
|
||||||
struct dmx_frontend* frontend; /* Front-end connected to the demux */
|
struct dmx_frontend* frontend; /* Front-end connected to the demux */
|
||||||
void* priv; /* Pointer to private data of the API client */
|
void* priv; /* Pointer to private data of the API client */
|
||||||
int (*open) (struct dmx_demux* demux);
|
int (*open) (struct dmx_demux* demux);
|
||||||
int (*close) (struct dmx_demux* demux);
|
int (*close) (struct dmx_demux* demux);
|
||||||
int (*write) (struct dmx_demux* demux, const char* buf, size_t count);
|
int (*write) (struct dmx_demux* demux, const char* buf, size_t count);
|
||||||
int (*allocate_ts_feed) (struct dmx_demux* demux,
|
int (*allocate_ts_feed) (struct dmx_demux* demux,
|
||||||
struct dmx_ts_feed** feed,
|
struct dmx_ts_feed** feed,
|
||||||
dmx_ts_cb callback);
|
dmx_ts_cb callback);
|
||||||
int (*release_ts_feed) (struct dmx_demux* demux,
|
int (*release_ts_feed) (struct dmx_demux* demux,
|
||||||
struct dmx_ts_feed* feed);
|
struct dmx_ts_feed* feed);
|
||||||
int (*allocate_section_feed) (struct dmx_demux* demux,
|
int (*allocate_section_feed) (struct dmx_demux* demux,
|
||||||
struct dmx_section_feed** feed,
|
struct dmx_section_feed** feed,
|
||||||
dmx_section_cb callback);
|
dmx_section_cb callback);
|
||||||
int (*release_section_feed) (struct dmx_demux* demux,
|
int (*release_section_feed) (struct dmx_demux* demux,
|
||||||
struct dmx_section_feed* feed);
|
struct dmx_section_feed* feed);
|
||||||
int (*add_frontend) (struct dmx_demux* demux,
|
int (*add_frontend) (struct dmx_demux* demux,
|
||||||
struct dmx_frontend* frontend);
|
struct dmx_frontend* frontend);
|
||||||
int (*remove_frontend) (struct dmx_demux* demux,
|
int (*remove_frontend) (struct dmx_demux* demux,
|
||||||
struct dmx_frontend* frontend);
|
struct dmx_frontend* frontend);
|
||||||
struct list_head* (*get_frontends) (struct dmx_demux* demux);
|
struct list_head* (*get_frontends) (struct dmx_demux* demux);
|
||||||
int (*connect_frontend) (struct dmx_demux* demux,
|
int (*connect_frontend) (struct dmx_demux* demux,
|
||||||
struct dmx_frontend* frontend);
|
struct dmx_frontend* frontend);
|
||||||
int (*disconnect_frontend) (struct dmx_demux* demux);
|
int (*disconnect_frontend) (struct dmx_demux* demux);
|
||||||
|
|
||||||
int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);
|
int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);
|
||||||
|
|
||||||
int (*get_caps) (struct dmx_demux* demux, struct dmx_caps *caps);
|
int (*get_caps) (struct dmx_demux* demux, struct dmx_caps *caps);
|
||||||
|
|
||||||
int (*set_source) (struct dmx_demux* demux, const dmx_source_t *src);
|
int (*set_source) (struct dmx_demux* demux, const dmx_source_t *src);
|
||||||
|
|
||||||
int (*get_stc) (struct dmx_demux* demux, unsigned int num,
|
int (*get_stc) (struct dmx_demux* demux, unsigned int num,
|
||||||
u64 *stc, unsigned int *base);
|
u64 *stc, unsigned int *base);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -947,7 +947,7 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file,
|
||||||
|
|
||||||
case DMX_GET_STC:
|
case DMX_GET_STC:
|
||||||
if (!dmxdev->demux->get_stc) {
|
if (!dmxdev->demux->get_stc) {
|
||||||
ret=-EINVAL;
|
ret=-EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ret = dmxdev->demux->get_stc(dmxdev->demux,
|
ret = dmxdev->demux->get_stc(dmxdev->demux,
|
||||||
|
|
|
@ -53,51 +53,51 @@ enum dmxdev_state {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dmxdev_buffer {
|
struct dmxdev_buffer {
|
||||||
u8 *data;
|
u8 *data;
|
||||||
int size;
|
int size;
|
||||||
int pread;
|
int pread;
|
||||||
int pwrite;
|
int pwrite;
|
||||||
wait_queue_head_t queue;
|
wait_queue_head_t queue;
|
||||||
int error;
|
int error;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dmxdev_filter {
|
struct dmxdev_filter {
|
||||||
struct dvb_device *dvbdev;
|
struct dvb_device *dvbdev;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct dmx_section_filter *sec;
|
struct dmx_section_filter *sec;
|
||||||
} filter;
|
} filter;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct dmx_ts_feed *ts;
|
struct dmx_ts_feed *ts;
|
||||||
struct dmx_section_feed *sec;
|
struct dmx_section_feed *sec;
|
||||||
} feed;
|
} feed;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct dmx_sct_filter_params sec;
|
struct dmx_sct_filter_params sec;
|
||||||
struct dmx_pes_filter_params pes;
|
struct dmx_pes_filter_params pes;
|
||||||
} params;
|
} params;
|
||||||
|
|
||||||
int type;
|
int type;
|
||||||
enum dmxdev_state state;
|
enum dmxdev_state state;
|
||||||
struct dmxdev *dev;
|
struct dmxdev *dev;
|
||||||
struct dmxdev_buffer buffer;
|
struct dmxdev_buffer buffer;
|
||||||
|
|
||||||
struct semaphore mutex;
|
struct semaphore mutex;
|
||||||
|
|
||||||
/* only for sections */
|
/* only for sections */
|
||||||
struct timer_list timer;
|
struct timer_list timer;
|
||||||
int todo;
|
int todo;
|
||||||
u8 secheader[3];
|
u8 secheader[3];
|
||||||
|
|
||||||
u16 pid;
|
u16 pid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct dmxdev_dvr {
|
struct dmxdev_dvr {
|
||||||
int state;
|
int state;
|
||||||
struct dmxdev *dev;
|
struct dmxdev *dev;
|
||||||
struct dmxdev_buffer buffer;
|
struct dmxdev_buffer buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,16 +105,16 @@ struct dmxdev {
|
||||||
struct dvb_device *dvbdev;
|
struct dvb_device *dvbdev;
|
||||||
struct dvb_device *dvr_dvbdev;
|
struct dvb_device *dvr_dvbdev;
|
||||||
|
|
||||||
struct dmxdev_filter *filter;
|
struct dmxdev_filter *filter;
|
||||||
struct dmxdev_dvr *dvr;
|
struct dmxdev_dvr *dvr;
|
||||||
struct dmx_demux *demux;
|
struct dmx_demux *demux;
|
||||||
|
|
||||||
int filternum;
|
int filternum;
|
||||||
int capabilities;
|
int capabilities;
|
||||||
#define DMXDEV_CAP_DUPLEX 1
|
#define DMXDEV_CAP_DUPLEX 1
|
||||||
struct dmx_frontend *dvr_orig_fe;
|
struct dmx_frontend *dvr_orig_fe;
|
||||||
|
|
||||||
struct dmxdev_buffer dvr_buffer;
|
struct dmxdev_buffer dvr_buffer;
|
||||||
#define DVR_BUFFER_SIZE (10*188*1024)
|
#define DVR_BUFFER_SIZE (10*188*1024)
|
||||||
|
|
||||||
struct semaphore mutex;
|
struct semaphore mutex;
|
||||||
|
|
|
@ -498,7 +498,7 @@ static int dvb_ca_en50221_parse_attributes(struct dvb_ca_private *ca, int slot)
|
||||||
/* process the CFTABLE_ENTRY tuples, and any after those */
|
/* process the CFTABLE_ENTRY tuples, and any after those */
|
||||||
while ((!end_chain) && (address < 0x1000)) {
|
while ((!end_chain) && (address < 0x1000)) {
|
||||||
if ((status = dvb_ca_en50221_read_tuple(ca, slot, &address, &tupleType,
|
if ((status = dvb_ca_en50221_read_tuple(ca, slot, &address, &tupleType,
|
||||||
&tupleLength, tuple)) < 0)
|
&tupleLength, tuple)) < 0)
|
||||||
return status;
|
return status;
|
||||||
switch (tupleType) {
|
switch (tupleType) {
|
||||||
case 0x1B: // CISTPL_CFTABLE_ENTRY
|
case 0x1B: // CISTPL_CFTABLE_ENTRY
|
||||||
|
|
|
@ -72,12 +72,12 @@ static int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, in
|
||||||
u8 pct;
|
u8 pct;
|
||||||
|
|
||||||
if (pr) printk( "Pic header: ");
|
if (pr) printk( "Pic header: ");
|
||||||
pic->temporal_reference[field] = (( headr[0] << 2 ) |
|
pic->temporal_reference[field] = (( headr[0] << 2 ) |
|
||||||
(headr[1] & 0x03) )& 0x03ff;
|
(headr[1] & 0x03) )& 0x03ff;
|
||||||
if (pr) printk( " temp ref: 0x%04x", pic->temporal_reference[field]);
|
if (pr) printk( " temp ref: 0x%04x", pic->temporal_reference[field]);
|
||||||
|
|
||||||
pct = ( headr[1] >> 2 ) & 0x07;
|
pct = ( headr[1] >> 2 ) & 0x07;
|
||||||
pic->picture_coding_type[field] = pct;
|
pic->picture_coding_type[field] = pct;
|
||||||
if (pr) {
|
if (pr) {
|
||||||
switch(pct){
|
switch(pct){
|
||||||
case I_FRAME:
|
case I_FRAME:
|
||||||
|
@ -93,17 +93,17 @@ static int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, in
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pic->vinfo.vbv_delay = (( headr[1] >> 5 ) | ( headr[2] << 3) |
|
pic->vinfo.vbv_delay = (( headr[1] >> 5 ) | ( headr[2] << 3) |
|
||||||
( (headr[3] & 0x1F) << 11) ) & 0xffff;
|
( (headr[3] & 0x1F) << 11) ) & 0xffff;
|
||||||
|
|
||||||
if (pr) printk( " vbv delay: 0x%04x", pic->vinfo.vbv_delay);
|
if (pr) printk( " vbv delay: 0x%04x", pic->vinfo.vbv_delay);
|
||||||
|
|
||||||
pic->picture_header_parameter = ( headr[3] & 0xe0 ) |
|
pic->picture_header_parameter = ( headr[3] & 0xe0 ) |
|
||||||
((headr[4] & 0x80) >> 3);
|
((headr[4] & 0x80) >> 3);
|
||||||
|
|
||||||
if ( pct == B_FRAME ){
|
if ( pct == B_FRAME ){
|
||||||
pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f;
|
pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f;
|
||||||
}
|
}
|
||||||
if (pr) printk( " pic head param: 0x%x",
|
if (pr) printk( " pic head param: 0x%x",
|
||||||
pic->picture_header_parameter);
|
pic->picture_header_parameter);
|
||||||
|
|
||||||
|
@ -124,18 +124,18 @@ static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
|
||||||
((headr[0]<<4)& 0x30)| ((headr[1]>>4)& 0x0F),
|
((headr[0]<<4)& 0x30)| ((headr[1]>>4)& 0x0F),
|
||||||
((headr[1]<<3)& 0x38)| ((headr[2]>>5)& 0x0F));
|
((headr[1]<<3)& 0x38)| ((headr[2]>>5)& 0x0F));
|
||||||
|
|
||||||
if ( ( headr[3] & 0x40 ) != 0 ){
|
if ( ( headr[3] & 0x40 ) != 0 ){
|
||||||
pic->closed_gop = 1;
|
pic->closed_gop = 1;
|
||||||
} else {
|
} else {
|
||||||
pic->closed_gop = 0;
|
pic->closed_gop = 0;
|
||||||
}
|
}
|
||||||
if (pr) printk("closed: %d", pic->closed_gop);
|
if (pr) printk("closed: %d", pic->closed_gop);
|
||||||
|
|
||||||
if ( ( headr[3] & 0x20 ) != 0 ){
|
if ( ( headr[3] & 0x20 ) != 0 ){
|
||||||
pic->broken_link = 1;
|
pic->broken_link = 1;
|
||||||
} else {
|
} else {
|
||||||
pic->broken_link = 0;
|
pic->broken_link = 0;
|
||||||
}
|
}
|
||||||
if (pr) printk(" broken: %d\n", pic->broken_link);
|
if (pr) printk(" broken: %d\n", pic->broken_link);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -146,7 +146,7 @@ static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
|
||||||
/* needs 8 byte input */
|
/* needs 8 byte input */
|
||||||
static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
|
static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
|
||||||
{
|
{
|
||||||
int sw;
|
int sw;
|
||||||
int form = -1;
|
int form = -1;
|
||||||
|
|
||||||
if (pr) printk("Reading sequence header\n");
|
if (pr) printk("Reading sequence header\n");
|
||||||
|
@ -154,9 +154,9 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
|
||||||
vi->horizontal_size = ((headr[1] &0xF0) >> 4) | (headr[0] << 4);
|
vi->horizontal_size = ((headr[1] &0xF0) >> 4) | (headr[0] << 4);
|
||||||
vi->vertical_size = ((headr[1] &0x0F) << 8) | (headr[2]);
|
vi->vertical_size = ((headr[1] &0x0F) << 8) | (headr[2]);
|
||||||
|
|
||||||
sw = (int)((headr[3]&0xF0) >> 4) ;
|
sw = (int)((headr[3]&0xF0) >> 4) ;
|
||||||
|
|
||||||
switch( sw ){
|
switch( sw ){
|
||||||
case 1:
|
case 1:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk("Videostream: ASPECT: 1:1");
|
printk("Videostream: ASPECT: 1:1");
|
||||||
|
@ -165,84 +165,84 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
|
||||||
case 2:
|
case 2:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk("Videostream: ASPECT: 4:3");
|
printk("Videostream: ASPECT: 4:3");
|
||||||
vi->aspect_ratio = 133;
|
vi->aspect_ratio = 133;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk("Videostream: ASPECT: 16:9");
|
printk("Videostream: ASPECT: 16:9");
|
||||||
vi->aspect_ratio = 177;
|
vi->aspect_ratio = 177;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk("Videostream: ASPECT: 2.21:1");
|
printk("Videostream: ASPECT: 2.21:1");
|
||||||
vi->aspect_ratio = 221;
|
vi->aspect_ratio = 221;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5 ... 15:
|
case 5 ... 15:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk("Videostream: ASPECT: reserved");
|
printk("Videostream: ASPECT: reserved");
|
||||||
vi->aspect_ratio = 0;
|
vi->aspect_ratio = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vi->aspect_ratio = 0;
|
vi->aspect_ratio = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pr)
|
if (pr)
|
||||||
printk(" Size = %dx%d",vi->horizontal_size,vi->vertical_size);
|
printk(" Size = %dx%d",vi->horizontal_size,vi->vertical_size);
|
||||||
|
|
||||||
sw = (int)(headr[3]&0x0F);
|
sw = (int)(headr[3]&0x0F);
|
||||||
|
|
||||||
switch ( sw ) {
|
switch ( sw ) {
|
||||||
case 1:
|
case 1:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk(" FRate: 23.976 fps");
|
printk(" FRate: 23.976 fps");
|
||||||
vi->framerate = 23976;
|
vi->framerate = 23976;
|
||||||
form = -1;
|
form = -1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk(" FRate: 24 fps");
|
printk(" FRate: 24 fps");
|
||||||
vi->framerate = 24000;
|
vi->framerate = 24000;
|
||||||
form = -1;
|
form = -1;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk(" FRate: 25 fps");
|
printk(" FRate: 25 fps");
|
||||||
vi->framerate = 25000;
|
vi->framerate = 25000;
|
||||||
form = VIDEO_MODE_PAL;
|
form = VIDEO_MODE_PAL;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk(" FRate: 29.97 fps");
|
printk(" FRate: 29.97 fps");
|
||||||
vi->framerate = 29970;
|
vi->framerate = 29970;
|
||||||
form = VIDEO_MODE_NTSC;
|
form = VIDEO_MODE_NTSC;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk(" FRate: 30 fps");
|
printk(" FRate: 30 fps");
|
||||||
vi->framerate = 30000;
|
vi->framerate = 30000;
|
||||||
form = VIDEO_MODE_NTSC;
|
form = VIDEO_MODE_NTSC;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk(" FRate: 50 fps");
|
printk(" FRate: 50 fps");
|
||||||
vi->framerate = 50000;
|
vi->framerate = 50000;
|
||||||
form = VIDEO_MODE_PAL;
|
form = VIDEO_MODE_PAL;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
if (pr)
|
if (pr)
|
||||||
printk(" FRate: 60 fps");
|
printk(" FRate: 60 fps");
|
||||||
vi->framerate = 60000;
|
vi->framerate = 60000;
|
||||||
form = VIDEO_MODE_NTSC;
|
form = VIDEO_MODE_NTSC;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
vi->bit_rate = (headr[4] << 10) | (headr[5] << 2) | (headr[6] & 0x03);
|
vi->bit_rate = (headr[4] << 10) | (headr[5] << 2) | (headr[6] & 0x03);
|
||||||
|
|
||||||
vi->vbv_buffer_size
|
vi->vbv_buffer_size
|
||||||
= (( headr[6] & 0xF8) >> 3 ) | (( headr[7] & 0x1F )<< 5);
|
= (( headr[6] & 0xF8) >> 3 ) | (( headr[7] & 0x1F )<< 5);
|
||||||
|
|
||||||
if (pr){
|
if (pr){
|
||||||
printk(" BRate: %d Mbit/s",4*(vi->bit_rate)/10000);
|
printk(" BRate: %d Mbit/s",4*(vi->bit_rate)/10000);
|
||||||
|
@ -250,7 +250,7 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
|
||||||
printk("\n");
|
printk("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
vi->video_format = form;
|
vi->video_format = form;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -308,7 +308,7 @@ static int get_ainfo(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr)
|
||||||
if (!found) return -1;
|
if (!found) return -1;
|
||||||
|
|
||||||
if (c+3 >= count) return -1;
|
if (c+3 >= count) return -1;
|
||||||
headr = mbuf+c;
|
headr = mbuf+c;
|
||||||
|
|
||||||
ai->layer = (headr[1] & 0x06) >> 1;
|
ai->layer = (headr[1] & 0x06) >> 1;
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p
|
||||||
if (c+5 >= count) return -1;
|
if (c+5 >= count) return -1;
|
||||||
|
|
||||||
ai->layer = 0; // 0 for AC3
|
ai->layer = 0; // 0 for AC3
|
||||||
headr = mbuf+c+2;
|
headr = mbuf+c+2;
|
||||||
|
|
||||||
frame = (headr[2]&0x3f);
|
frame = (headr[2]&0x3f);
|
||||||
ai->bit_rate = ac3_bitrates[frame >> 1]*1000;
|
ai->bit_rate = ac3_bitrates[frame >> 1]*1000;
|
||||||
|
@ -396,159 +396,159 @@ EXPORT_SYMBOL(dvb_filter_get_ac3info);
|
||||||
#if 0
|
#if 0
|
||||||
static u8 *skip_pes_header(u8 **bufp)
|
static u8 *skip_pes_header(u8 **bufp)
|
||||||
{
|
{
|
||||||
u8 *inbuf = *bufp;
|
u8 *inbuf = *bufp;
|
||||||
u8 *buf = inbuf;
|
u8 *buf = inbuf;
|
||||||
u8 *pts = NULL;
|
u8 *pts = NULL;
|
||||||
int skip = 0;
|
int skip = 0;
|
||||||
|
|
||||||
static const int mpeg1_skip_table[16] = {
|
static const int mpeg1_skip_table[16] = {
|
||||||
1, 0xffff, 5, 10, 0xffff, 0xffff, 0xffff, 0xffff,
|
1, 0xffff, 5, 10, 0xffff, 0xffff, 0xffff, 0xffff,
|
||||||
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
|
0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if ((inbuf[6] & 0xc0) == 0x80){ /* mpeg2 */
|
if ((inbuf[6] & 0xc0) == 0x80){ /* mpeg2 */
|
||||||
if (buf[7] & PTS_ONLY)
|
if (buf[7] & PTS_ONLY)
|
||||||
pts = buf+9;
|
pts = buf+9;
|
||||||
else pts = NULL;
|
else pts = NULL;
|
||||||
buf = inbuf + 9 + inbuf[8];
|
buf = inbuf + 9 + inbuf[8];
|
||||||
} else { /* mpeg1 */
|
} else { /* mpeg1 */
|
||||||
for (buf = inbuf + 6; *buf == 0xff; buf++)
|
for (buf = inbuf + 6; *buf == 0xff; buf++)
|
||||||
if (buf == inbuf + 6 + 16) {
|
if (buf == inbuf + 6 + 16) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((*buf & 0xc0) == 0x40)
|
if ((*buf & 0xc0) == 0x40)
|
||||||
buf += 2;
|
buf += 2;
|
||||||
skip = mpeg1_skip_table [*buf >> 4];
|
skip = mpeg1_skip_table [*buf >> 4];
|
||||||
if (skip == 5 || skip == 10) pts = buf;
|
if (skip == 5 || skip == 10) pts = buf;
|
||||||
else pts = NULL;
|
else pts = NULL;
|
||||||
|
|
||||||
buf += mpeg1_skip_table [*buf >> 4];
|
buf += mpeg1_skip_table [*buf >> 4];
|
||||||
}
|
}
|
||||||
|
|
||||||
*bufp = buf;
|
*bufp = buf;
|
||||||
return pts;
|
return pts;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void initialize_quant_matrix( u32 *matrix )
|
static void initialize_quant_matrix( u32 *matrix )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
matrix[0] = 0x08101013;
|
matrix[0] = 0x08101013;
|
||||||
matrix[1] = 0x10131616;
|
matrix[1] = 0x10131616;
|
||||||
matrix[2] = 0x16161616;
|
matrix[2] = 0x16161616;
|
||||||
matrix[3] = 0x1a181a1b;
|
matrix[3] = 0x1a181a1b;
|
||||||
matrix[4] = 0x1b1b1a1a;
|
matrix[4] = 0x1b1b1a1a;
|
||||||
matrix[5] = 0x1a1a1b1b;
|
matrix[5] = 0x1a1a1b1b;
|
||||||
matrix[6] = 0x1b1d1d1d;
|
matrix[6] = 0x1b1d1d1d;
|
||||||
matrix[7] = 0x2222221d;
|
matrix[7] = 0x2222221d;
|
||||||
matrix[8] = 0x1d1d1b1b;
|
matrix[8] = 0x1d1d1b1b;
|
||||||
matrix[9] = 0x1d1d2020;
|
matrix[9] = 0x1d1d2020;
|
||||||
matrix[10] = 0x22222526;
|
matrix[10] = 0x22222526;
|
||||||
matrix[11] = 0x25232322;
|
matrix[11] = 0x25232322;
|
||||||
matrix[12] = 0x23262628;
|
matrix[12] = 0x23262628;
|
||||||
matrix[13] = 0x28283030;
|
matrix[13] = 0x28283030;
|
||||||
matrix[14] = 0x2e2e3838;
|
matrix[14] = 0x2e2e3838;
|
||||||
matrix[15] = 0x3a454553;
|
matrix[15] = 0x3a454553;
|
||||||
|
|
||||||
for ( i = 16 ; i < 32 ; i++ )
|
for ( i = 16 ; i < 32 ; i++ )
|
||||||
matrix[i] = 0x10101010;
|
matrix[i] = 0x10101010;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void initialize_mpg_picture(struct mpg_picture *pic)
|
static void initialize_mpg_picture(struct mpg_picture *pic)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* set MPEG1 */
|
/* set MPEG1 */
|
||||||
pic->mpeg1_flag = 1;
|
pic->mpeg1_flag = 1;
|
||||||
pic->profile_and_level = 0x4A ; /* MP@LL */
|
pic->profile_and_level = 0x4A ; /* MP@LL */
|
||||||
pic->progressive_sequence = 1;
|
pic->progressive_sequence = 1;
|
||||||
pic->low_delay = 0;
|
pic->low_delay = 0;
|
||||||
|
|
||||||
pic->sequence_display_extension_flag = 0;
|
pic->sequence_display_extension_flag = 0;
|
||||||
for ( i = 0 ; i < 4 ; i++ ){
|
for ( i = 0 ; i < 4 ; i++ ){
|
||||||
pic->frame_centre_horizontal_offset[i] = 0;
|
pic->frame_centre_horizontal_offset[i] = 0;
|
||||||
pic->frame_centre_vertical_offset[i] = 0;
|
pic->frame_centre_vertical_offset[i] = 0;
|
||||||
}
|
}
|
||||||
pic->last_frame_centre_horizontal_offset = 0;
|
pic->last_frame_centre_horizontal_offset = 0;
|
||||||
pic->last_frame_centre_vertical_offset = 0;
|
pic->last_frame_centre_vertical_offset = 0;
|
||||||
|
|
||||||
pic->picture_display_extension_flag[0] = 0;
|
pic->picture_display_extension_flag[0] = 0;
|
||||||
pic->picture_display_extension_flag[1] = 0;
|
pic->picture_display_extension_flag[1] = 0;
|
||||||
pic->sequence_header_flag = 0;
|
pic->sequence_header_flag = 0;
|
||||||
pic->gop_flag = 0;
|
pic->gop_flag = 0;
|
||||||
pic->sequence_end_flag = 0;
|
pic->sequence_end_flag = 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic )
|
static void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic )
|
||||||
{
|
{
|
||||||
int16_t last_h_offset;
|
int16_t last_h_offset;
|
||||||
int16_t last_v_offset;
|
int16_t last_v_offset;
|
||||||
|
|
||||||
int16_t *p_h_offset;
|
int16_t *p_h_offset;
|
||||||
int16_t *p_v_offset;
|
int16_t *p_v_offset;
|
||||||
|
|
||||||
if ( pic->mpeg1_flag ){
|
if ( pic->mpeg1_flag ){
|
||||||
pic->picture_structure[field_type] = VIDEO_FRAME_PICTURE;
|
pic->picture_structure[field_type] = VIDEO_FRAME_PICTURE;
|
||||||
pic->top_field_first = 0;
|
pic->top_field_first = 0;
|
||||||
pic->repeat_first_field = 0;
|
pic->repeat_first_field = 0;
|
||||||
pic->progressive_frame = 1;
|
pic->progressive_frame = 1;
|
||||||
pic->picture_coding_parameter = 0x000010;
|
pic->picture_coding_parameter = 0x000010;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset flag */
|
/* Reset flag */
|
||||||
pic->picture_display_extension_flag[field_type] = 0;
|
pic->picture_display_extension_flag[field_type] = 0;
|
||||||
|
|
||||||
last_h_offset = pic->last_frame_centre_horizontal_offset;
|
last_h_offset = pic->last_frame_centre_horizontal_offset;
|
||||||
last_v_offset = pic->last_frame_centre_vertical_offset;
|
last_v_offset = pic->last_frame_centre_vertical_offset;
|
||||||
if ( field_type == FIRST_FIELD ){
|
if ( field_type == FIRST_FIELD ){
|
||||||
p_h_offset = pic->frame_centre_horizontal_offset;
|
p_h_offset = pic->frame_centre_horizontal_offset;
|
||||||
p_v_offset = pic->frame_centre_vertical_offset;
|
p_v_offset = pic->frame_centre_vertical_offset;
|
||||||
*p_h_offset = last_h_offset;
|
*p_h_offset = last_h_offset;
|
||||||
*(p_h_offset + 1) = last_h_offset;
|
*(p_h_offset + 1) = last_h_offset;
|
||||||
*(p_h_offset + 2) = last_h_offset;
|
*(p_h_offset + 2) = last_h_offset;
|
||||||
*p_v_offset = last_v_offset;
|
*p_v_offset = last_v_offset;
|
||||||
*(p_v_offset + 1) = last_v_offset;
|
*(p_v_offset + 1) = last_v_offset;
|
||||||
*(p_v_offset + 2) = last_v_offset;
|
*(p_v_offset + 2) = last_v_offset;
|
||||||
} else {
|
} else {
|
||||||
pic->frame_centre_horizontal_offset[3] = last_h_offset;
|
pic->frame_centre_horizontal_offset[3] = last_h_offset;
|
||||||
pic->frame_centre_vertical_offset[3] = last_v_offset;
|
pic->frame_centre_vertical_offset[3] = last_v_offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void init_mpg_picture( struct mpg_picture *pic, int chan, int32_t field_type)
|
static void init_mpg_picture( struct mpg_picture *pic, int chan, int32_t field_type)
|
||||||
{
|
{
|
||||||
pic->picture_header = 0;
|
pic->picture_header = 0;
|
||||||
pic->sequence_header_data
|
pic->sequence_header_data
|
||||||
= ( INIT_HORIZONTAL_SIZE << 20 )
|
= ( INIT_HORIZONTAL_SIZE << 20 )
|
||||||
| ( INIT_VERTICAL_SIZE << 8 )
|
| ( INIT_VERTICAL_SIZE << 8 )
|
||||||
| ( INIT_ASPECT_RATIO << 4 )
|
| ( INIT_ASPECT_RATIO << 4 )
|
||||||
| ( INIT_FRAME_RATE );
|
| ( INIT_FRAME_RATE );
|
||||||
pic->mpeg1_flag = 0;
|
pic->mpeg1_flag = 0;
|
||||||
pic->vinfo.horizontal_size
|
pic->vinfo.horizontal_size
|
||||||
= INIT_DISP_HORIZONTAL_SIZE;
|
= INIT_DISP_HORIZONTAL_SIZE;
|
||||||
pic->vinfo.vertical_size
|
pic->vinfo.vertical_size
|
||||||
= INIT_DISP_VERTICAL_SIZE;
|
= INIT_DISP_VERTICAL_SIZE;
|
||||||
pic->picture_display_extension_flag[field_type]
|
pic->picture_display_extension_flag[field_type]
|
||||||
= 0;
|
= 0;
|
||||||
pic->pts_flag[field_type] = 0;
|
pic->pts_flag[field_type] = 0;
|
||||||
|
|
||||||
pic->sequence_gop_header = 0;
|
pic->sequence_gop_header = 0;
|
||||||
pic->picture_header = 0;
|
pic->picture_header = 0;
|
||||||
pic->sequence_header_flag = 0;
|
pic->sequence_header_flag = 0;
|
||||||
pic->gop_flag = 0;
|
pic->gop_flag = 0;
|
||||||
pic->sequence_end_flag = 0;
|
pic->sequence_end_flag = 0;
|
||||||
pic->sequence_display_extension_flag = 0;
|
pic->sequence_display_extension_flag = 0;
|
||||||
pic->last_frame_centre_horizontal_offset = 0;
|
pic->last_frame_centre_horizontal_offset = 0;
|
||||||
pic->last_frame_centre_vertical_offset = 0;
|
pic->last_frame_centre_vertical_offset = 0;
|
||||||
pic->channel = chan;
|
pic->channel = chan;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -588,11 +588,11 @@ int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
|
||||||
buf[1]&=~0x40;
|
buf[1]&=~0x40;
|
||||||
}
|
}
|
||||||
if (!len)
|
if (!len)
|
||||||
return 0;
|
return 0;
|
||||||
buf[3]=0x30|((p2ts->cc++)&0x0f);
|
buf[3]=0x30|((p2ts->cc++)&0x0f);
|
||||||
rest=183-len;
|
rest=183-len;
|
||||||
if (rest) {
|
if (rest) {
|
||||||
buf[5]=0x00;
|
buf[5]=0x00;
|
||||||
if (rest-1)
|
if (rest-1)
|
||||||
memset(buf+6, 0xff, rest-1);
|
memset(buf+6, 0xff, rest-1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,8 @@ typedef int (dvb_filter_pes2ts_cb_t) (void *, unsigned char *);
|
||||||
|
|
||||||
struct dvb_filter_pes2ts {
|
struct dvb_filter_pes2ts {
|
||||||
unsigned char buf[188];
|
unsigned char buf[188];
|
||||||
unsigned char cc;
|
unsigned char cc;
|
||||||
dvb_filter_pes2ts_cb_t *cb;
|
dvb_filter_pes2ts_cb_t *cb;
|
||||||
void *priv;
|
void *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ struct dvb_video_info {
|
||||||
u32 bit_rate;
|
u32 bit_rate;
|
||||||
u32 comp_bit_rate;
|
u32 comp_bit_rate;
|
||||||
u32 vbv_buffer_size;
|
u32 vbv_buffer_size;
|
||||||
s16 vbv_delay;
|
s16 vbv_delay;
|
||||||
u32 CSPF;
|
u32 CSPF;
|
||||||
u32 off;
|
u32 off;
|
||||||
};
|
};
|
||||||
|
@ -173,60 +173,60 @@ struct dvb_video_info {
|
||||||
#define VIDEO_FRAME_PICTURE 0x03
|
#define VIDEO_FRAME_PICTURE 0x03
|
||||||
|
|
||||||
struct mpg_picture {
|
struct mpg_picture {
|
||||||
int channel;
|
int channel;
|
||||||
struct dvb_video_info vinfo;
|
struct dvb_video_info vinfo;
|
||||||
u32 *sequence_gop_header;
|
u32 *sequence_gop_header;
|
||||||
u32 *picture_header;
|
u32 *picture_header;
|
||||||
s32 time_code;
|
s32 time_code;
|
||||||
int low_delay;
|
int low_delay;
|
||||||
int closed_gop;
|
int closed_gop;
|
||||||
int broken_link;
|
int broken_link;
|
||||||
int sequence_header_flag;
|
int sequence_header_flag;
|
||||||
int gop_flag;
|
int gop_flag;
|
||||||
int sequence_end_flag;
|
int sequence_end_flag;
|
||||||
|
|
||||||
u8 profile_and_level;
|
u8 profile_and_level;
|
||||||
s32 picture_coding_parameter;
|
s32 picture_coding_parameter;
|
||||||
u32 matrix[32];
|
u32 matrix[32];
|
||||||
s8 matrix_change_flag;
|
s8 matrix_change_flag;
|
||||||
|
|
||||||
u8 picture_header_parameter;
|
u8 picture_header_parameter;
|
||||||
/* bit 0 - 2: bwd f code
|
/* bit 0 - 2: bwd f code
|
||||||
bit 3 : fpb vector
|
bit 3 : fpb vector
|
||||||
bit 4 - 6: fwd f code
|
bit 4 - 6: fwd f code
|
||||||
bit 7 : fpf vector */
|
bit 7 : fpf vector */
|
||||||
|
|
||||||
int mpeg1_flag;
|
int mpeg1_flag;
|
||||||
int progressive_sequence;
|
int progressive_sequence;
|
||||||
int sequence_display_extension_flag;
|
int sequence_display_extension_flag;
|
||||||
u32 sequence_header_data;
|
u32 sequence_header_data;
|
||||||
s16 last_frame_centre_horizontal_offset;
|
s16 last_frame_centre_horizontal_offset;
|
||||||
s16 last_frame_centre_vertical_offset;
|
s16 last_frame_centre_vertical_offset;
|
||||||
|
|
||||||
u32 pts[2]; /* [0] 1st field, [1] 2nd field */
|
u32 pts[2]; /* [0] 1st field, [1] 2nd field */
|
||||||
int top_field_first;
|
int top_field_first;
|
||||||
int repeat_first_field;
|
int repeat_first_field;
|
||||||
int progressive_frame;
|
int progressive_frame;
|
||||||
int bank;
|
int bank;
|
||||||
int forward_bank;
|
int forward_bank;
|
||||||
int backward_bank;
|
int backward_bank;
|
||||||
int compress;
|
int compress;
|
||||||
s16 frame_centre_horizontal_offset[OFF_SIZE];
|
s16 frame_centre_horizontal_offset[OFF_SIZE];
|
||||||
/* [0-2] 1st field, [3] 2nd field */
|
/* [0-2] 1st field, [3] 2nd field */
|
||||||
s16 frame_centre_vertical_offset[OFF_SIZE];
|
s16 frame_centre_vertical_offset[OFF_SIZE];
|
||||||
/* [0-2] 1st field, [3] 2nd field */
|
/* [0-2] 1st field, [3] 2nd field */
|
||||||
s16 temporal_reference[2];
|
s16 temporal_reference[2];
|
||||||
/* [0] 1st field, [1] 2nd field */
|
/* [0] 1st field, [1] 2nd field */
|
||||||
|
|
||||||
s8 picture_coding_type[2];
|
s8 picture_coding_type[2];
|
||||||
/* [0] 1st field, [1] 2nd field */
|
/* [0] 1st field, [1] 2nd field */
|
||||||
s8 picture_structure[2];
|
s8 picture_structure[2];
|
||||||
/* [0] 1st field, [1] 2nd field */
|
/* [0] 1st field, [1] 2nd field */
|
||||||
s8 picture_display_extension_flag[2];
|
s8 picture_display_extension_flag[2];
|
||||||
/* [0] 1st field, [1] 2nd field */
|
/* [0] 1st field, [1] 2nd field */
|
||||||
/* picture_display_extenion() 0:no 1:exit*/
|
/* picture_display_extenion() 0:no 1:exit*/
|
||||||
s8 pts_flag[2];
|
s8 pts_flag[2];
|
||||||
/* [0] 1st field, [1] 2nd field */
|
/* [0] 1st field, [1] 2nd field */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dvb_audio_info {
|
struct dvb_audio_info {
|
||||||
|
|
|
@ -372,10 +372,10 @@ static int dvb_frontend_thread(void *data)
|
||||||
|
|
||||||
snprintf (name, sizeof(name), "kdvb-fe-%i", fe->dvb->num);
|
snprintf (name, sizeof(name), "kdvb-fe-%i", fe->dvb->num);
|
||||||
|
|
||||||
lock_kernel();
|
lock_kernel();
|
||||||
daemonize(name);
|
daemonize(name);
|
||||||
sigfillset(¤t->blocked);
|
sigfillset(¤t->blocked);
|
||||||
unlock_kernel();
|
unlock_kernel();
|
||||||
|
|
||||||
fepriv->status = 0;
|
fepriv->status = 0;
|
||||||
dvb_frontend_init(fe);
|
dvb_frontend_init(fe);
|
||||||
|
|
|
@ -41,10 +41,10 @@
|
||||||
#include "dvbdev.h"
|
#include "dvbdev.h"
|
||||||
|
|
||||||
struct dvb_frontend_tune_settings {
|
struct dvb_frontend_tune_settings {
|
||||||
int min_delay_ms;
|
int min_delay_ms;
|
||||||
int step_size;
|
int step_size;
|
||||||
int max_drift;
|
int max_drift;
|
||||||
struct dvb_frontend_parameters parameters;
|
struct dvb_frontend_parameters parameters;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dvb_frontend;
|
struct dvb_frontend;
|
||||||
|
|
|
@ -713,7 +713,7 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
|
||||||
if (buffer1_len > 32768)
|
if (buffer1_len > 32768)
|
||||||
printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len);
|
printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len);
|
||||||
/* printk("TS callback: %u bytes, %u TS cells @ %p.\n",
|
/* printk("TS callback: %u bytes, %u TS cells @ %p.\n",
|
||||||
buffer1_len, buffer1_len / TS_SZ, buffer1); */
|
buffer1_len, buffer1_len / TS_SZ, buffer1); */
|
||||||
dvb_net_ule(dev, buffer1, buffer1_len);
|
dvb_net_ule(dev, buffer1, buffer1_len);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -721,8 +721,8 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
|
||||||
|
|
||||||
static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
|
static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
|
||||||
{
|
{
|
||||||
u8 *eth;
|
u8 *eth;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
struct net_device_stats *stats = &(((struct dvb_net_priv *) dev->priv)->stats);
|
struct net_device_stats *stats = &(((struct dvb_net_priv *) dev->priv)->stats);
|
||||||
int snap = 0;
|
int snap = 0;
|
||||||
|
|
||||||
|
@ -754,7 +754,7 @@ static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
snap = 8;
|
snap = 8;
|
||||||
}
|
}
|
||||||
if (pkt[7]) {
|
if (pkt[7]) {
|
||||||
/* FIXME: assemble datagram from multiple sections */
|
/* FIXME: assemble datagram from multiple sections */
|
||||||
stats->rx_errors++;
|
stats->rx_errors++;
|
||||||
|
@ -778,14 +778,14 @@ static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
|
||||||
memcpy(eth + 14, pkt + 12 + snap, pkt_len - 12 - 4 - snap);
|
memcpy(eth + 14, pkt + 12 + snap, pkt_len - 12 - 4 - snap);
|
||||||
|
|
||||||
/* create ethernet header: */
|
/* create ethernet header: */
|
||||||
eth[0]=pkt[0x0b];
|
eth[0]=pkt[0x0b];
|
||||||
eth[1]=pkt[0x0a];
|
eth[1]=pkt[0x0a];
|
||||||
eth[2]=pkt[0x09];
|
eth[2]=pkt[0x09];
|
||||||
eth[3]=pkt[0x08];
|
eth[3]=pkt[0x08];
|
||||||
eth[4]=pkt[0x04];
|
eth[4]=pkt[0x04];
|
||||||
eth[5]=pkt[0x03];
|
eth[5]=pkt[0x03];
|
||||||
|
|
||||||
eth[6]=eth[7]=eth[8]=eth[9]=eth[10]=eth[11]=0;
|
eth[6]=eth[7]=eth[8]=eth[9]=eth[10]=eth[11]=0;
|
||||||
|
|
||||||
if (snap) {
|
if (snap) {
|
||||||
eth[12] = pkt[18];
|
eth[12] = pkt[18];
|
||||||
|
@ -807,7 +807,7 @@ static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
|
||||||
|
|
||||||
stats->rx_packets++;
|
stats->rx_packets++;
|
||||||
stats->rx_bytes+=skb->len;
|
stats->rx_bytes+=skb->len;
|
||||||
netif_rx(skb);
|
netif_rx(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
|
static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
|
||||||
|
@ -815,7 +815,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
|
||||||
struct dmx_section_filter *filter,
|
struct dmx_section_filter *filter,
|
||||||
enum dmx_success success)
|
enum dmx_success success)
|
||||||
{
|
{
|
||||||
struct net_device *dev = filter->priv;
|
struct net_device *dev = filter->priv;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* we rely on the DVB API definition where exactly one complete
|
* we rely on the DVB API definition where exactly one complete
|
||||||
|
@ -885,8 +885,8 @@ static int dvb_net_feed_start(struct net_device *dev)
|
||||||
{
|
{
|
||||||
int ret = 0, i;
|
int ret = 0, i;
|
||||||
struct dvb_net_priv *priv = dev->priv;
|
struct dvb_net_priv *priv = dev->priv;
|
||||||
struct dmx_demux *demux = priv->demux;
|
struct dmx_demux *demux = priv->demux;
|
||||||
unsigned char *mac = (unsigned char *) dev->dev_addr;
|
unsigned char *mac = (unsigned char *) dev->dev_addr;
|
||||||
|
|
||||||
dprintk("%s: rx_mode %i\n", __FUNCTION__, priv->rx_mode);
|
dprintk("%s: rx_mode %i\n", __FUNCTION__, priv->rx_mode);
|
||||||
down(&priv->mutex);
|
down(&priv->mutex);
|
||||||
|
@ -1129,12 +1129,12 @@ static int dvb_net_stop(struct net_device *dev)
|
||||||
struct dvb_net_priv *priv = dev->priv;
|
struct dvb_net_priv *priv = dev->priv;
|
||||||
|
|
||||||
priv->in_use--;
|
priv->in_use--;
|
||||||
return dvb_net_feed_stop(dev);
|
return dvb_net_feed_stop(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct net_device_stats * dvb_net_get_stats(struct net_device *dev)
|
static struct net_device_stats * dvb_net_get_stats(struct net_device *dev)
|
||||||
{
|
{
|
||||||
return &((struct dvb_net_priv*) dev->priv)->stats;
|
return &((struct dvb_net_priv*) dev->priv)->stats;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dvb_net_setup(struct net_device *dev)
|
static void dvb_net_setup(struct net_device *dev)
|
||||||
|
@ -1360,10 +1360,10 @@ static struct file_operations dvb_net_fops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct dvb_device dvbdev_net = {
|
static struct dvb_device dvbdev_net = {
|
||||||
.priv = NULL,
|
.priv = NULL,
|
||||||
.users = 1,
|
.users = 1,
|
||||||
.writers = 1,
|
.writers = 1,
|
||||||
.fops = &dvb_net_fops,
|
.fops = &dvb_net_fops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,216 +42,216 @@
|
||||||
|
|
||||||
void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len)
|
void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len)
|
||||||
{
|
{
|
||||||
rbuf->pread=rbuf->pwrite=0;
|
rbuf->pread=rbuf->pwrite=0;
|
||||||
rbuf->data=data;
|
rbuf->data=data;
|
||||||
rbuf->size=len;
|
rbuf->size=len;
|
||||||
|
|
||||||
init_waitqueue_head(&rbuf->queue);
|
init_waitqueue_head(&rbuf->queue);
|
||||||
|
|
||||||
spin_lock_init(&(rbuf->lock));
|
spin_lock_init(&(rbuf->lock));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf)
|
int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf)
|
||||||
{
|
{
|
||||||
return (rbuf->pread==rbuf->pwrite);
|
return (rbuf->pread==rbuf->pwrite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf)
|
ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf)
|
||||||
{
|
{
|
||||||
ssize_t free;
|
ssize_t free;
|
||||||
|
|
||||||
free = rbuf->pread - rbuf->pwrite;
|
free = rbuf->pread - rbuf->pwrite;
|
||||||
if (free <= 0)
|
if (free <= 0)
|
||||||
free += rbuf->size;
|
free += rbuf->size;
|
||||||
return free-1;
|
return free-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf)
|
ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf)
|
||||||
{
|
{
|
||||||
ssize_t avail;
|
ssize_t avail;
|
||||||
|
|
||||||
avail = rbuf->pwrite - rbuf->pread;
|
avail = rbuf->pwrite - rbuf->pread;
|
||||||
if (avail < 0)
|
if (avail < 0)
|
||||||
avail += rbuf->size;
|
avail += rbuf->size;
|
||||||
return avail;
|
return avail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf)
|
void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf)
|
||||||
{
|
{
|
||||||
rbuf->pread = rbuf->pwrite;
|
rbuf->pread = rbuf->pwrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf)
|
void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&rbuf->lock, flags);
|
spin_lock_irqsave(&rbuf->lock, flags);
|
||||||
dvb_ringbuffer_flush(rbuf);
|
dvb_ringbuffer_flush(rbuf);
|
||||||
spin_unlock_irqrestore(&rbuf->lock, flags);
|
spin_unlock_irqrestore(&rbuf->lock, flags);
|
||||||
|
|
||||||
wake_up(&rbuf->queue);
|
wake_up(&rbuf->queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, size_t len, int usermem)
|
ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, size_t len, int usermem)
|
||||||
{
|
{
|
||||||
size_t todo = len;
|
size_t todo = len;
|
||||||
size_t split;
|
size_t split;
|
||||||
|
|
||||||
split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0;
|
split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0;
|
||||||
if (split > 0) {
|
if (split > 0) {
|
||||||
if (!usermem)
|
if (!usermem)
|
||||||
memcpy(buf, rbuf->data+rbuf->pread, split);
|
memcpy(buf, rbuf->data+rbuf->pread, split);
|
||||||
else
|
else
|
||||||
if (copy_to_user(buf, rbuf->data+rbuf->pread, split))
|
if (copy_to_user(buf, rbuf->data+rbuf->pread, split))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
buf += split;
|
buf += split;
|
||||||
todo -= split;
|
todo -= split;
|
||||||
rbuf->pread = 0;
|
rbuf->pread = 0;
|
||||||
}
|
}
|
||||||
if (!usermem)
|
if (!usermem)
|
||||||
memcpy(buf, rbuf->data+rbuf->pread, todo);
|
memcpy(buf, rbuf->data+rbuf->pread, todo);
|
||||||
else
|
else
|
||||||
if (copy_to_user(buf, rbuf->data+rbuf->pread, todo))
|
if (copy_to_user(buf, rbuf->data+rbuf->pread, todo))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
rbuf->pread = (rbuf->pread + todo) % rbuf->size;
|
rbuf->pread = (rbuf->pread + todo) % rbuf->size;
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf, size_t len)
|
ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf, size_t len)
|
||||||
{
|
{
|
||||||
size_t todo = len;
|
size_t todo = len;
|
||||||
size_t split;
|
size_t split;
|
||||||
|
|
||||||
split = (rbuf->pwrite + len > rbuf->size) ? rbuf->size - rbuf->pwrite : 0;
|
split = (rbuf->pwrite + len > rbuf->size) ? rbuf->size - rbuf->pwrite : 0;
|
||||||
|
|
||||||
if (split > 0) {
|
if (split > 0) {
|
||||||
memcpy(rbuf->data+rbuf->pwrite, buf, split);
|
memcpy(rbuf->data+rbuf->pwrite, buf, split);
|
||||||
buf += split;
|
buf += split;
|
||||||
todo -= split;
|
todo -= split;
|
||||||
rbuf->pwrite = 0;
|
rbuf->pwrite = 0;
|
||||||
}
|
}
|
||||||
memcpy(rbuf->data+rbuf->pwrite, buf, todo);
|
memcpy(rbuf->data+rbuf->pwrite, buf, todo);
|
||||||
rbuf->pwrite = (rbuf->pwrite + todo) % rbuf->size;
|
rbuf->pwrite = (rbuf->pwrite + todo) % rbuf->size;
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf, size_t len)
|
ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf, size_t len)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
ssize_t oldpwrite = rbuf->pwrite;
|
ssize_t oldpwrite = rbuf->pwrite;
|
||||||
|
|
||||||
DVB_RINGBUFFER_WRITE_BYTE(rbuf, len >> 8);
|
DVB_RINGBUFFER_WRITE_BYTE(rbuf, len >> 8);
|
||||||
DVB_RINGBUFFER_WRITE_BYTE(rbuf, len & 0xff);
|
DVB_RINGBUFFER_WRITE_BYTE(rbuf, len & 0xff);
|
||||||
DVB_RINGBUFFER_WRITE_BYTE(rbuf, PKT_READY);
|
DVB_RINGBUFFER_WRITE_BYTE(rbuf, PKT_READY);
|
||||||
status = dvb_ringbuffer_write(rbuf, buf, len);
|
status = dvb_ringbuffer_write(rbuf, buf, len);
|
||||||
|
|
||||||
if (status < 0) rbuf->pwrite = oldpwrite;
|
if (status < 0) rbuf->pwrite = oldpwrite;
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,
|
ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,
|
||||||
int offset, u8* buf, size_t len, int usermem)
|
int offset, u8* buf, size_t len, int usermem)
|
||||||
{
|
{
|
||||||
size_t todo;
|
size_t todo;
|
||||||
size_t split;
|
size_t split;
|
||||||
size_t pktlen;
|
size_t pktlen;
|
||||||
|
|
||||||
pktlen = rbuf->data[idx] << 8;
|
pktlen = rbuf->data[idx] << 8;
|
||||||
pktlen |= rbuf->data[(idx + 1) % rbuf->size];
|
pktlen |= rbuf->data[(idx + 1) % rbuf->size];
|
||||||
if (offset > pktlen) return -EINVAL;
|
if (offset > pktlen) return -EINVAL;
|
||||||
if ((offset + len) > pktlen) len = pktlen - offset;
|
if ((offset + len) > pktlen) len = pktlen - offset;
|
||||||
|
|
||||||
idx = (idx + DVB_RINGBUFFER_PKTHDRSIZE + offset) % rbuf->size;
|
idx = (idx + DVB_RINGBUFFER_PKTHDRSIZE + offset) % rbuf->size;
|
||||||
todo = len;
|
todo = len;
|
||||||
split = ((idx + len) > rbuf->size) ? rbuf->size - idx : 0;
|
split = ((idx + len) > rbuf->size) ? rbuf->size - idx : 0;
|
||||||
if (split > 0) {
|
if (split > 0) {
|
||||||
if (!usermem)
|
if (!usermem)
|
||||||
memcpy(buf, rbuf->data+idx, split);
|
memcpy(buf, rbuf->data+idx, split);
|
||||||
else
|
else
|
||||||
if (copy_to_user(buf, rbuf->data+idx, split))
|
if (copy_to_user(buf, rbuf->data+idx, split))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
buf += split;
|
buf += split;
|
||||||
todo -= split;
|
todo -= split;
|
||||||
idx = 0;
|
idx = 0;
|
||||||
}
|
}
|
||||||
if (!usermem)
|
if (!usermem)
|
||||||
memcpy(buf, rbuf->data+idx, todo);
|
memcpy(buf, rbuf->data+idx, todo);
|
||||||
else
|
else
|
||||||
if (copy_to_user(buf, rbuf->data+idx, todo))
|
if (copy_to_user(buf, rbuf->data+idx, todo))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dvb_ringbuffer_pkt_dispose(struct dvb_ringbuffer *rbuf, size_t idx)
|
void dvb_ringbuffer_pkt_dispose(struct dvb_ringbuffer *rbuf, size_t idx)
|
||||||
{
|
{
|
||||||
size_t pktlen;
|
size_t pktlen;
|
||||||
|
|
||||||
rbuf->data[(idx + 2) % rbuf->size] = PKT_DISPOSED;
|
rbuf->data[(idx + 2) % rbuf->size] = PKT_DISPOSED;
|
||||||
|
|
||||||
// clean up disposed packets
|
// clean up disposed packets
|
||||||
while(dvb_ringbuffer_avail(rbuf) > DVB_RINGBUFFER_PKTHDRSIZE) {
|
while(dvb_ringbuffer_avail(rbuf) > DVB_RINGBUFFER_PKTHDRSIZE) {
|
||||||
if (DVB_RINGBUFFER_PEEK(rbuf, 2) == PKT_DISPOSED) {
|
if (DVB_RINGBUFFER_PEEK(rbuf, 2) == PKT_DISPOSED) {
|
||||||
pktlen = DVB_RINGBUFFER_PEEK(rbuf, 0) << 8;
|
pktlen = DVB_RINGBUFFER_PEEK(rbuf, 0) << 8;
|
||||||
pktlen |= DVB_RINGBUFFER_PEEK(rbuf, 1);
|
pktlen |= DVB_RINGBUFFER_PEEK(rbuf, 1);
|
||||||
DVB_RINGBUFFER_SKIP(rbuf, pktlen + DVB_RINGBUFFER_PKTHDRSIZE);
|
DVB_RINGBUFFER_SKIP(rbuf, pktlen + DVB_RINGBUFFER_PKTHDRSIZE);
|
||||||
} else {
|
} else {
|
||||||
// first packet is not disposed, so we stop cleaning now
|
// first packet is not disposed, so we stop cleaning now
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t dvb_ringbuffer_pkt_next(struct dvb_ringbuffer *rbuf, size_t idx, size_t* pktlen)
|
ssize_t dvb_ringbuffer_pkt_next(struct dvb_ringbuffer *rbuf, size_t idx, size_t* pktlen)
|
||||||
{
|
{
|
||||||
int consumed;
|
int consumed;
|
||||||
int curpktlen;
|
int curpktlen;
|
||||||
int curpktstatus;
|
int curpktstatus;
|
||||||
|
|
||||||
if (idx == -1) {
|
if (idx == -1) {
|
||||||
idx = rbuf->pread;
|
idx = rbuf->pread;
|
||||||
} else {
|
} else {
|
||||||
curpktlen = rbuf->data[idx] << 8;
|
curpktlen = rbuf->data[idx] << 8;
|
||||||
curpktlen |= rbuf->data[(idx + 1) % rbuf->size];
|
curpktlen |= rbuf->data[(idx + 1) % rbuf->size];
|
||||||
idx = (idx + curpktlen + DVB_RINGBUFFER_PKTHDRSIZE) % rbuf->size;
|
idx = (idx + curpktlen + DVB_RINGBUFFER_PKTHDRSIZE) % rbuf->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
consumed = (idx - rbuf->pread) % rbuf->size;
|
consumed = (idx - rbuf->pread) % rbuf->size;
|
||||||
|
|
||||||
while((dvb_ringbuffer_avail(rbuf) - consumed) > DVB_RINGBUFFER_PKTHDRSIZE) {
|
while((dvb_ringbuffer_avail(rbuf) - consumed) > DVB_RINGBUFFER_PKTHDRSIZE) {
|
||||||
|
|
||||||
curpktlen = rbuf->data[idx] << 8;
|
curpktlen = rbuf->data[idx] << 8;
|
||||||
curpktlen |= rbuf->data[(idx + 1) % rbuf->size];
|
curpktlen |= rbuf->data[(idx + 1) % rbuf->size];
|
||||||
curpktstatus = rbuf->data[(idx + 2) % rbuf->size];
|
curpktstatus = rbuf->data[(idx + 2) % rbuf->size];
|
||||||
|
|
||||||
if (curpktstatus == PKT_READY) {
|
if (curpktstatus == PKT_READY) {
|
||||||
*pktlen = curpktlen;
|
*pktlen = curpktlen;
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
consumed += curpktlen + DVB_RINGBUFFER_PKTHDRSIZE;
|
consumed += curpktlen + DVB_RINGBUFFER_PKTHDRSIZE;
|
||||||
idx = (idx + curpktlen + DVB_RINGBUFFER_PKTHDRSIZE) % rbuf->size;
|
idx = (idx + curpktlen + DVB_RINGBUFFER_PKTHDRSIZE) % rbuf->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no packets available
|
// no packets available
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,13 @@
|
||||||
#include <linux/wait.h>
|
#include <linux/wait.h>
|
||||||
|
|
||||||
struct dvb_ringbuffer {
|
struct dvb_ringbuffer {
|
||||||
u8 *data;
|
u8 *data;
|
||||||
ssize_t size;
|
ssize_t size;
|
||||||
ssize_t pread;
|
ssize_t pread;
|
||||||
ssize_t pwrite;
|
ssize_t pwrite;
|
||||||
|
|
||||||
wait_queue_head_t queue;
|
wait_queue_head_t queue;
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DVB_RINGBUFFER_PKTHDRSIZE 3
|
#define DVB_RINGBUFFER_PKTHDRSIZE 3
|
||||||
|
@ -106,7 +106,7 @@ extern void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf);
|
||||||
** returns number of bytes transferred or -EFAULT
|
** returns number of bytes transferred or -EFAULT
|
||||||
*/
|
*/
|
||||||
extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf,
|
extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf,
|
||||||
size_t len, int usermem);
|
size_t len, int usermem);
|
||||||
|
|
||||||
|
|
||||||
/* write routines & macros */
|
/* write routines & macros */
|
||||||
|
@ -121,7 +121,7 @@ extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf,
|
||||||
** returns number of bytes transferred or -EFAULT
|
** returns number of bytes transferred or -EFAULT
|
||||||
*/
|
*/
|
||||||
extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
|
extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
|
||||||
size_t len);
|
size_t len);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -133,7 +133,7 @@ extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
|
||||||
* returns Number of bytes written, or -EFAULT, -ENOMEM, -EVINAL.
|
* returns Number of bytes written, or -EFAULT, -ENOMEM, -EVINAL.
|
||||||
*/
|
*/
|
||||||
extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf,
|
extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf,
|
||||||
size_t len);
|
size_t len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read from a packet in the ringbuffer. Note: unlike dvb_ringbuffer_read(), this
|
* Read from a packet in the ringbuffer. Note: unlike dvb_ringbuffer_read(), this
|
||||||
|
@ -149,7 +149,7 @@ extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf,
|
||||||
* returns Number of bytes read, or -EFAULT.
|
* returns Number of bytes read, or -EFAULT.
|
||||||
*/
|
*/
|
||||||
extern ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,
|
extern ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,
|
||||||
int offset, u8* buf, size_t len, int usermem);
|
int offset, u8* buf, size_t len, int usermem);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispose of a packet in the ring buffer.
|
* Dispose of a packet in the ring buffer.
|
||||||
|
|
|
@ -47,7 +47,7 @@ static LIST_HEAD(dvb_adapter_list);
|
||||||
static DECLARE_MUTEX(dvbdev_register_lock);
|
static DECLARE_MUTEX(dvbdev_register_lock);
|
||||||
|
|
||||||
static const char * const dnames[] = {
|
static const char * const dnames[] = {
|
||||||
"video", "audio", "sec", "frontend", "demux", "dvr", "ca",
|
"video", "audio", "sec", "frontend", "demux", "dvr", "ca",
|
||||||
"net", "osd"
|
"net", "osd"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -90,15 +90,15 @@ static int dvb_device_open(struct inode *inode, struct file *file)
|
||||||
|
|
||||||
file->private_data = dvbdev;
|
file->private_data = dvbdev;
|
||||||
old_fops = file->f_op;
|
old_fops = file->f_op;
|
||||||
file->f_op = fops_get(dvbdev->fops);
|
file->f_op = fops_get(dvbdev->fops);
|
||||||
if(file->f_op->open)
|
if(file->f_op->open)
|
||||||
err = file->f_op->open(inode,file);
|
err = file->f_op->open(inode,file);
|
||||||
if (err) {
|
if (err) {
|
||||||
fops_put(file->f_op);
|
fops_put(file->f_op);
|
||||||
file->f_op = fops_get(old_fops);
|
file->f_op = fops_get(old_fops);
|
||||||
}
|
}
|
||||||
fops_put(old_fops);
|
fops_put(old_fops);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
@ -117,21 +117,21 @@ static struct cdev dvb_device_cdev = {
|
||||||
|
|
||||||
int dvb_generic_open(struct inode *inode, struct file *file)
|
int dvb_generic_open(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct dvb_device *dvbdev = file->private_data;
|
struct dvb_device *dvbdev = file->private_data;
|
||||||
|
|
||||||
if (!dvbdev)
|
if (!dvbdev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (!dvbdev->users)
|
if (!dvbdev->users)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
|
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
|
||||||
if (!dvbdev->readers)
|
if (!dvbdev->readers)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
dvbdev->readers--;
|
dvbdev->readers--;
|
||||||
} else {
|
} else {
|
||||||
if (!dvbdev->writers)
|
if (!dvbdev->writers)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
dvbdev->writers--;
|
dvbdev->writers--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,10 +143,10 @@ EXPORT_SYMBOL(dvb_generic_open);
|
||||||
|
|
||||||
int dvb_generic_release(struct inode *inode, struct file *file)
|
int dvb_generic_release(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct dvb_device *dvbdev = file->private_data;
|
struct dvb_device *dvbdev = file->private_data;
|
||||||
|
|
||||||
if (!dvbdev)
|
if (!dvbdev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
|
if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
|
||||||
dvbdev->readers++;
|
dvbdev->readers++;
|
||||||
|
@ -163,10 +163,10 @@ EXPORT_SYMBOL(dvb_generic_release);
|
||||||
int dvb_generic_ioctl(struct inode *inode, struct file *file,
|
int dvb_generic_ioctl(struct inode *inode, struct file *file,
|
||||||
unsigned int cmd, unsigned long arg)
|
unsigned int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
struct dvb_device *dvbdev = file->private_data;
|
struct dvb_device *dvbdev = file->private_data;
|
||||||
|
|
||||||
if (!dvbdev)
|
if (!dvbdev)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (!dvbdev->kernel_ioctl)
|
if (!dvbdev->kernel_ioctl)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -334,63 +334,63 @@ EXPORT_SYMBOL(dvb_unregister_adapter);
|
||||||
to the v4l "videodev.o" module, which is unnecessary for some
|
to the v4l "videodev.o" module, which is unnecessary for some
|
||||||
cards (ie. the budget dvb-cards don't need the v4l module...) */
|
cards (ie. the budget dvb-cards don't need the v4l module...) */
|
||||||
int dvb_usercopy(struct inode *inode, struct file *file,
|
int dvb_usercopy(struct inode *inode, struct file *file,
|
||||||
unsigned int cmd, unsigned long arg,
|
unsigned int cmd, unsigned long arg,
|
||||||
int (*func)(struct inode *inode, struct file *file,
|
int (*func)(struct inode *inode, struct file *file,
|
||||||
unsigned int cmd, void *arg))
|
unsigned int cmd, void *arg))
|
||||||
{
|
{
|
||||||
char sbuf[128];
|
char sbuf[128];
|
||||||
void *mbuf = NULL;
|
void *mbuf = NULL;
|
||||||
void *parg = NULL;
|
void *parg = NULL;
|
||||||
int err = -EINVAL;
|
int err = -EINVAL;
|
||||||
|
|
||||||
/* Copy arguments into temp kernel buffer */
|
/* Copy arguments into temp kernel buffer */
|
||||||
switch (_IOC_DIR(cmd)) {
|
switch (_IOC_DIR(cmd)) {
|
||||||
case _IOC_NONE:
|
case _IOC_NONE:
|
||||||
/*
|
/*
|
||||||
* For this command, the pointer is actually an integer
|
* For this command, the pointer is actually an integer
|
||||||
* argument.
|
* argument.
|
||||||
*/
|
*/
|
||||||
parg = (void *) arg;
|
parg = (void *) arg;
|
||||||
break;
|
break;
|
||||||
case _IOC_READ: /* some v4l ioctls are marked wrong ... */
|
case _IOC_READ: /* some v4l ioctls are marked wrong ... */
|
||||||
case _IOC_WRITE:
|
case _IOC_WRITE:
|
||||||
case (_IOC_WRITE | _IOC_READ):
|
case (_IOC_WRITE | _IOC_READ):
|
||||||
if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {
|
if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {
|
||||||
parg = sbuf;
|
parg = sbuf;
|
||||||
} else {
|
} else {
|
||||||
/* too big to allocate from stack */
|
/* too big to allocate from stack */
|
||||||
mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL);
|
mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL);
|
||||||
if (NULL == mbuf)
|
if (NULL == mbuf)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
parg = mbuf;
|
parg = mbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd)))
|
if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd)))
|
||||||
goto out;
|
goto out;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* call driver */
|
/* call driver */
|
||||||
if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD)
|
if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD)
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
|
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* Copy results into user buffer */
|
/* Copy results into user buffer */
|
||||||
switch (_IOC_DIR(cmd))
|
switch (_IOC_DIR(cmd))
|
||||||
{
|
{
|
||||||
case _IOC_READ:
|
case _IOC_READ:
|
||||||
case (_IOC_WRITE | _IOC_READ):
|
case (_IOC_WRITE | _IOC_READ):
|
||||||
if (copy_to_user((void __user *)arg, parg, _IOC_SIZE(cmd)))
|
if (copy_to_user((void __user *)arg, parg, _IOC_SIZE(cmd)))
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
kfree(mbuf);
|
kfree(mbuf);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init init_dvbdev(void)
|
static int __init init_dvbdev(void)
|
||||||
|
@ -427,10 +427,10 @@ error:
|
||||||
|
|
||||||
static void __exit exit_dvbdev(void)
|
static void __exit exit_dvbdev(void)
|
||||||
{
|
{
|
||||||
devfs_remove("dvb");
|
devfs_remove("dvb");
|
||||||
class_destroy(dvb_class);
|
class_destroy(dvb_class);
|
||||||
cdev_del(&dvb_device_cdev);
|
cdev_del(&dvb_device_cdev);
|
||||||
unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
|
unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(init_dvbdev);
|
module_init(init_dvbdev);
|
||||||
|
|
|
@ -68,8 +68,8 @@ struct dvb_device {
|
||||||
int writers;
|
int writers;
|
||||||
int users;
|
int users;
|
||||||
|
|
||||||
/* don't really need those !? -- FIXME: use video_usercopy */
|
/* don't really need those !? -- FIXME: use video_usercopy */
|
||||||
int (*kernel_ioctl)(struct inode *inode, struct file *file,
|
int (*kernel_ioctl)(struct inode *inode, struct file *file,
|
||||||
unsigned int cmd, void *arg);
|
unsigned int cmd, void *arg);
|
||||||
|
|
||||||
void *priv;
|
void *priv;
|
||||||
|
@ -97,7 +97,7 @@ we simply define out own dvb_usercopy(), which will hopefully become
|
||||||
generic_usercopy() someday... */
|
generic_usercopy() someday... */
|
||||||
|
|
||||||
extern int dvb_usercopy(struct inode *inode, struct file *file,
|
extern int dvb_usercopy(struct inode *inode, struct file *file,
|
||||||
unsigned int cmd, unsigned long arg,
|
unsigned int cmd, unsigned long arg,
|
||||||
int (*func)(struct inode *inode, struct file *file,
|
int (*func)(struct inode *inode, struct file *file,
|
||||||
unsigned int cmd, void *arg));
|
unsigned int cmd, void *arg));
|
||||||
|
|
||||||
|
|
|
@ -190,7 +190,7 @@ static int vp702x_fe_get_frontend(struct dvb_frontend* fe,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe,
|
static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe,
|
||||||
struct dvb_diseqc_master_cmd *m)
|
struct dvb_diseqc_master_cmd *m)
|
||||||
{
|
{
|
||||||
struct vp702x_fe_state *st = fe->demodulator_priv;
|
struct vp702x_fe_state *st = fe->demodulator_priv;
|
||||||
u8 cmd[8],ibuf[10];
|
u8 cmd[8],ibuf[10];
|
||||||
|
|
|
@ -58,7 +58,7 @@ static int vp7045_fe_read_ber(struct dvb_frontend* fe, u32 *ber)
|
||||||
struct vp7045_fe_state *state = fe->demodulator_priv;
|
struct vp7045_fe_state *state = fe->demodulator_priv;
|
||||||
*ber = (vp7045_read_reg(state->d, 0x0D) << 16) |
|
*ber = (vp7045_read_reg(state->d, 0x0D) << 16) |
|
||||||
(vp7045_read_reg(state->d, 0x0E) << 8) |
|
(vp7045_read_reg(state->d, 0x0E) << 8) |
|
||||||
vp7045_read_reg(state->d, 0x0F);
|
vp7045_read_reg(state->d, 0x0F);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -361,9 +361,9 @@ static int at76c651_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
|
||||||
|
|
||||||
static int at76c651_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *fesettings)
|
static int at76c651_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *fesettings)
|
||||||
{
|
{
|
||||||
fesettings->min_delay_ms = 50;
|
fesettings->min_delay_ms = 50;
|
||||||
fesettings->step_size = 0;
|
fesettings->step_size = 0;
|
||||||
fesettings->max_drift = 0;
|
fesettings->max_drift = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info,2=i2c (|-able)).");
|
||||||
#define dbufout(b,l,m) {\
|
#define dbufout(b,l,m) {\
|
||||||
int i; \
|
int i; \
|
||||||
for (i = 0; i < l; i++) \
|
for (i = 0; i < l; i++) \
|
||||||
m("%02x ",b[i]); \
|
m("%02x ",b[i]); \
|
||||||
}
|
}
|
||||||
#define deb_info(args...) dprintk(0x01,args)
|
#define deb_info(args...) dprintk(0x01,args)
|
||||||
#define deb_i2c(args...) dprintk(0x02,args)
|
#define deb_i2c(args...) dprintk(0x02,args)
|
||||||
|
@ -827,7 +827,7 @@ static struct dvb_frontend_ops bcm3510_ops = {
|
||||||
.type = FE_ATSC,
|
.type = FE_ATSC,
|
||||||
.frequency_min = 54000000,
|
.frequency_min = 54000000,
|
||||||
.frequency_max = 803000000,
|
.frequency_max = 803000000,
|
||||||
/* stepsize is just a guess */
|
/* stepsize is just a guess */
|
||||||
.frequency_stepsize = 0,
|
.frequency_stepsize = 0,
|
||||||
.caps =
|
.caps =
|
||||||
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
|
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
|
||||||
|
|
|
@ -355,10 +355,10 @@ static int cx22700_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
|
||||||
|
|
||||||
static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
|
static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
|
||||||
{
|
{
|
||||||
fesettings->min_delay_ms = 150;
|
fesettings->min_delay_ms = 150;
|
||||||
fesettings->step_size = 166667;
|
fesettings->step_size = 166667;
|
||||||
fesettings->max_drift = 166667*2;
|
fesettings->max_drift = 166667*2;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cx22700_release(struct dvb_frontend* fe)
|
static void cx22700_release(struct dvb_frontend* fe)
|
||||||
|
@ -407,7 +407,7 @@ static struct dvb_frontend_ops cx22700_ops = {
|
||||||
.caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
|
.caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
|
||||||
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
|
||||||
FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
|
FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
|
||||||
FE_CAN_RECOVER
|
FE_CAN_RECOVER
|
||||||
},
|
},
|
||||||
|
|
||||||
.release = cx22700_release,
|
.release = cx22700_release,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Conexant 22702 DVB OFDM demodulator driver
|
Conexant 22702 DVB OFDM demodulator driver
|
||||||
|
|
||||||
based on:
|
based on:
|
||||||
Alps TDMB7 DVB OFDM demodulator driver
|
Alps TDMB7 DVB OFDM demodulator driver
|
||||||
|
|
||||||
Copyright (C) 2001-2002 Convergence Integrated Media GmbH
|
Copyright (C) 2001-2002 Convergence Integrated Media GmbH
|
||||||
Holger Waechtler <holger@convergence.de>
|
Holger Waechtler <holger@convergence.de>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Conexant 22702 DVB OFDM demodulator driver
|
Conexant 22702 DVB OFDM demodulator driver
|
||||||
|
|
||||||
based on:
|
based on:
|
||||||
Alps TDMB7 DVB OFDM demodulator driver
|
Alps TDMB7 DVB OFDM demodulator driver
|
||||||
|
|
||||||
Copyright (C) 2001-2002 Convergence Integrated Media GmbH
|
Copyright (C) 2001-2002 Convergence Integrated Media GmbH
|
||||||
Holger Waechtler <holger@convergence.de>
|
Holger Waechtler <holger@convergence.de>
|
||||||
|
|
|
@ -55,81 +55,81 @@ static int debug;
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static struct {u8 reg; u8 data;} cx24110_regdata[]=
|
static struct {u8 reg; u8 data;} cx24110_regdata[]=
|
||||||
/* Comments beginning with @ denote this value should
|
/* Comments beginning with @ denote this value should
|
||||||
be the default */
|
be the default */
|
||||||
{{0x09,0x01}, /* SoftResetAll */
|
{{0x09,0x01}, /* SoftResetAll */
|
||||||
{0x09,0x00}, /* release reset */
|
{0x09,0x00}, /* release reset */
|
||||||
{0x01,0xe8}, /* MSB of code rate 27.5MS/s */
|
{0x01,0xe8}, /* MSB of code rate 27.5MS/s */
|
||||||
{0x02,0x17}, /* middle byte " */
|
{0x02,0x17}, /* middle byte " */
|
||||||
{0x03,0x29}, /* LSB " */
|
{0x03,0x29}, /* LSB " */
|
||||||
{0x05,0x03}, /* @ DVB mode, standard code rate 3/4 */
|
{0x05,0x03}, /* @ DVB mode, standard code rate 3/4 */
|
||||||
{0x06,0xa5}, /* @ PLL 60MHz */
|
{0x06,0xa5}, /* @ PLL 60MHz */
|
||||||
{0x07,0x01}, /* @ Fclk, i.e. sampling clock, 60MHz */
|
{0x07,0x01}, /* @ Fclk, i.e. sampling clock, 60MHz */
|
||||||
{0x0a,0x00}, /* @ partial chip disables, do not set */
|
{0x0a,0x00}, /* @ partial chip disables, do not set */
|
||||||
{0x0b,0x01}, /* set output clock in gapped mode, start signal low
|
{0x0b,0x01}, /* set output clock in gapped mode, start signal low
|
||||||
active for first byte */
|
active for first byte */
|
||||||
{0x0c,0x11}, /* no parity bytes, large hold time, serial data out */
|
{0x0c,0x11}, /* no parity bytes, large hold time, serial data out */
|
||||||
{0x0d,0x6f}, /* @ RS Sync/Unsync thresholds */
|
{0x0d,0x6f}, /* @ RS Sync/Unsync thresholds */
|
||||||
{0x10,0x40}, /* chip doc is misleading here: write bit 6 as 1
|
{0x10,0x40}, /* chip doc is misleading here: write bit 6 as 1
|
||||||
to avoid starting the BER counter. Reset the
|
to avoid starting the BER counter. Reset the
|
||||||
CRC test bit. Finite counting selected */
|
CRC test bit. Finite counting selected */
|
||||||
{0x15,0xff}, /* @ size of the limited time window for RS BER
|
{0x15,0xff}, /* @ size of the limited time window for RS BER
|
||||||
estimation. It is <value>*256 RS blocks, this
|
estimation. It is <value>*256 RS blocks, this
|
||||||
gives approx. 2.6 sec at 27.5MS/s, rate 3/4 */
|
gives approx. 2.6 sec at 27.5MS/s, rate 3/4 */
|
||||||
{0x16,0x00}, /* @ enable all RS output ports */
|
{0x16,0x00}, /* @ enable all RS output ports */
|
||||||
{0x17,0x04}, /* @ time window allowed for the RS to sync */
|
{0x17,0x04}, /* @ time window allowed for the RS to sync */
|
||||||
{0x18,0xae}, /* @ allow all standard DVB code rates to be scanned
|
{0x18,0xae}, /* @ allow all standard DVB code rates to be scanned
|
||||||
for automatically */
|
for automatically */
|
||||||
/* leave the current code rate and normalization
|
/* leave the current code rate and normalization
|
||||||
registers as they are after reset... */
|
registers as they are after reset... */
|
||||||
{0x21,0x10}, /* @ during AutoAcq, search each viterbi setting
|
{0x21,0x10}, /* @ during AutoAcq, search each viterbi setting
|
||||||
only once */
|
only once */
|
||||||
{0x23,0x18}, /* @ size of the limited time window for Viterbi BER
|
{0x23,0x18}, /* @ size of the limited time window for Viterbi BER
|
||||||
estimation. It is <value>*65536 channel bits, i.e.
|
estimation. It is <value>*65536 channel bits, i.e.
|
||||||
approx. 38ms at 27.5MS/s, rate 3/4 */
|
approx. 38ms at 27.5MS/s, rate 3/4 */
|
||||||
{0x24,0x24}, /* do not trigger Viterbi CRC test. Finite count window */
|
{0x24,0x24}, /* do not trigger Viterbi CRC test. Finite count window */
|
||||||
/* leave front-end AGC parameters at default values */
|
/* leave front-end AGC parameters at default values */
|
||||||
/* leave decimation AGC parameters at default values */
|
/* leave decimation AGC parameters at default values */
|
||||||
{0x35,0x40}, /* disable all interrupts. They are not connected anyway */
|
{0x35,0x40}, /* disable all interrupts. They are not connected anyway */
|
||||||
{0x36,0xff}, /* clear all interrupt pending flags */
|
{0x36,0xff}, /* clear all interrupt pending flags */
|
||||||
{0x37,0x00}, /* @ fully enable AutoAcqq state machine */
|
{0x37,0x00}, /* @ fully enable AutoAcqq state machine */
|
||||||
{0x38,0x07}, /* @ enable fade recovery, but not autostart AutoAcq */
|
{0x38,0x07}, /* @ enable fade recovery, but not autostart AutoAcq */
|
||||||
/* leave the equalizer parameters on their default values */
|
/* leave the equalizer parameters on their default values */
|
||||||
/* leave the final AGC parameters on their default values */
|
/* leave the final AGC parameters on their default values */
|
||||||
{0x41,0x00}, /* @ MSB of front-end derotator frequency */
|
{0x41,0x00}, /* @ MSB of front-end derotator frequency */
|
||||||
{0x42,0x00}, /* @ middle bytes " */
|
{0x42,0x00}, /* @ middle bytes " */
|
||||||
{0x43,0x00}, /* @ LSB " */
|
{0x43,0x00}, /* @ LSB " */
|
||||||
/* leave the carrier tracking loop parameters on default */
|
/* leave the carrier tracking loop parameters on default */
|
||||||
/* leave the bit timing loop parameters at gefault */
|
/* leave the bit timing loop parameters at gefault */
|
||||||
{0x56,0x4d}, /* set the filtune voltage to 2.7V, as recommended by */
|
{0x56,0x4d}, /* set the filtune voltage to 2.7V, as recommended by */
|
||||||
/* the cx24108 data sheet for symbol rates above 15MS/s */
|
/* the cx24108 data sheet for symbol rates above 15MS/s */
|
||||||
{0x57,0x00}, /* @ Filter sigma delta enabled, positive */
|
{0x57,0x00}, /* @ Filter sigma delta enabled, positive */
|
||||||
{0x61,0x95}, /* GPIO pins 1-4 have special function */
|
{0x61,0x95}, /* GPIO pins 1-4 have special function */
|
||||||
{0x62,0x05}, /* GPIO pin 5 has special function, pin 6 is GPIO */
|
{0x62,0x05}, /* GPIO pin 5 has special function, pin 6 is GPIO */
|
||||||
{0x63,0x00}, /* All GPIO pins use CMOS output characteristics */
|
{0x63,0x00}, /* All GPIO pins use CMOS output characteristics */
|
||||||
{0x64,0x20}, /* GPIO 6 is input, all others are outputs */
|
{0x64,0x20}, /* GPIO 6 is input, all others are outputs */
|
||||||
{0x6d,0x30}, /* tuner auto mode clock freq 62kHz */
|
{0x6d,0x30}, /* tuner auto mode clock freq 62kHz */
|
||||||
{0x70,0x15}, /* use auto mode, tuner word is 21 bits long */
|
{0x70,0x15}, /* use auto mode, tuner word is 21 bits long */
|
||||||
{0x73,0x00}, /* @ disable several demod bypasses */
|
{0x73,0x00}, /* @ disable several demod bypasses */
|
||||||
{0x74,0x00}, /* @ " */
|
{0x74,0x00}, /* @ " */
|
||||||
{0x75,0x00} /* @ " */
|
{0x75,0x00} /* @ " */
|
||||||
/* the remaining registers are for SEC */
|
/* the remaining registers are for SEC */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static int cx24110_writereg (struct cx24110_state* state, int reg, int data)
|
static int cx24110_writereg (struct cx24110_state* state, int reg, int data)
|
||||||
{
|
{
|
||||||
u8 buf [] = { reg, data };
|
u8 buf [] = { reg, data };
|
||||||
struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };
|
struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
|
if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
|
||||||
dprintk ("%s: writereg error (err == %i, reg == 0x%02x,"
|
dprintk ("%s: writereg error (err == %i, reg == 0x%02x,"
|
||||||
" data == 0x%02x)\n", __FUNCTION__, err, reg, data);
|
" data == 0x%02x)\n", __FUNCTION__, err, reg, data);
|
||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cx24110_readreg (struct cx24110_state* state, u8 reg)
|
static int cx24110_readreg (struct cx24110_state* state, u8 reg)
|
||||||
|
@ -153,27 +153,27 @@ static int cx24110_set_inversion (struct cx24110_state* state, fe_spectral_inver
|
||||||
|
|
||||||
switch (inversion) {
|
switch (inversion) {
|
||||||
case INVERSION_OFF:
|
case INVERSION_OFF:
|
||||||
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);
|
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);
|
||||||
/* AcqSpectrInvDis on. No idea why someone should want this */
|
/* AcqSpectrInvDis on. No idea why someone should want this */
|
||||||
cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)&0xf7);
|
cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)&0xf7);
|
||||||
/* Initial value 0 at start of acq */
|
/* Initial value 0 at start of acq */
|
||||||
cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)&0xef);
|
cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)&0xef);
|
||||||
/* current value 0 */
|
/* current value 0 */
|
||||||
/* The cx24110 manual tells us this reg is read-only.
|
/* The cx24110 manual tells us this reg is read-only.
|
||||||
But what the heck... set it ayways */
|
But what the heck... set it ayways */
|
||||||
break;
|
break;
|
||||||
case INVERSION_ON:
|
case INVERSION_ON:
|
||||||
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);
|
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);
|
||||||
/* AcqSpectrInvDis on. No idea why someone should want this */
|
/* AcqSpectrInvDis on. No idea why someone should want this */
|
||||||
cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)|0x08);
|
cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)|0x08);
|
||||||
/* Initial value 1 at start of acq */
|
/* Initial value 1 at start of acq */
|
||||||
cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)|0x10);
|
cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)|0x10);
|
||||||
/* current value 1 */
|
/* current value 1 */
|
||||||
break;
|
break;
|
||||||
case INVERSION_AUTO:
|
case INVERSION_AUTO:
|
||||||
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xfe);
|
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xfe);
|
||||||
/* AcqSpectrInvDis off. Leave initial & current states as is */
|
/* AcqSpectrInvDis off. Leave initial & current states as is */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -185,18 +185,18 @@ static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec)
|
||||||
{
|
{
|
||||||
/* fixme (low): error handling */
|
/* fixme (low): error handling */
|
||||||
|
|
||||||
static const int rate[]={-1,1,2,3,5,7,-1};
|
static const int rate[]={-1,1,2,3,5,7,-1};
|
||||||
static const int g1[]={-1,0x01,0x02,0x05,0x15,0x45,-1};
|
static const int g1[]={-1,0x01,0x02,0x05,0x15,0x45,-1};
|
||||||
static const int g2[]={-1,0x01,0x03,0x06,0x1a,0x7a,-1};
|
static const int g2[]={-1,0x01,0x03,0x06,0x1a,0x7a,-1};
|
||||||
|
|
||||||
/* Well, the AutoAcq engine of the cx24106 and 24110 automatically
|
/* Well, the AutoAcq engine of the cx24106 and 24110 automatically
|
||||||
searches all enabled viterbi rates, and can handle non-standard
|
searches all enabled viterbi rates, and can handle non-standard
|
||||||
rates as well. */
|
rates as well. */
|
||||||
|
|
||||||
if (fec>FEC_AUTO)
|
if (fec>FEC_AUTO)
|
||||||
fec=FEC_AUTO;
|
fec=FEC_AUTO;
|
||||||
|
|
||||||
if (fec==FEC_AUTO) { /* (re-)establish AutoAcq behaviour */
|
if (fec==FEC_AUTO) { /* (re-)establish AutoAcq behaviour */
|
||||||
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xdf);
|
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xdf);
|
||||||
/* clear AcqVitDis bit */
|
/* clear AcqVitDis bit */
|
||||||
cx24110_writereg(state,0x18,0xae);
|
cx24110_writereg(state,0x18,0xae);
|
||||||
|
@ -208,7 +208,7 @@ static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec)
|
||||||
cx24110_writereg(state,0x1a,0x05); cx24110_writereg(state,0x1b,0x06);
|
cx24110_writereg(state,0x1a,0x05); cx24110_writereg(state,0x1b,0x06);
|
||||||
/* set the puncture registers for code rate 3/4 */
|
/* set the puncture registers for code rate 3/4 */
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x20);
|
cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x20);
|
||||||
/* set AcqVitDis bit */
|
/* set AcqVitDis bit */
|
||||||
if(rate[fec]>0) {
|
if(rate[fec]>0) {
|
||||||
|
@ -219,10 +219,10 @@ static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec)
|
||||||
cx24110_writereg(state,0x1a,g1[fec]);
|
cx24110_writereg(state,0x1a,g1[fec]);
|
||||||
cx24110_writereg(state,0x1b,g2[fec]);
|
cx24110_writereg(state,0x1b,g2[fec]);
|
||||||
/* not sure if this is the right way: I always used AutoAcq mode */
|
/* not sure if this is the right way: I always used AutoAcq mode */
|
||||||
} else
|
} else
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
/* fixme (low): which is the correct return code? */
|
/* fixme (low): which is the correct return code? */
|
||||||
};
|
};
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,72 +245,72 @@ static fe_code_rate_t cx24110_get_fec (struct cx24110_state* state)
|
||||||
static int cx24110_set_symbolrate (struct cx24110_state* state, u32 srate)
|
static int cx24110_set_symbolrate (struct cx24110_state* state, u32 srate)
|
||||||
{
|
{
|
||||||
/* fixme (low): add error handling */
|
/* fixme (low): add error handling */
|
||||||
u32 ratio;
|
u32 ratio;
|
||||||
u32 tmp, fclk, BDRI;
|
u32 tmp, fclk, BDRI;
|
||||||
|
|
||||||
static const u32 bands[]={5000000UL,15000000UL,90999000UL/2};
|
static const u32 bands[]={5000000UL,15000000UL,90999000UL/2};
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate);
|
dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate);
|
||||||
if (srate>90999000UL/2)
|
if (srate>90999000UL/2)
|
||||||
srate=90999000UL/2;
|
srate=90999000UL/2;
|
||||||
if (srate<500000)
|
if (srate<500000)
|
||||||
srate=500000;
|
srate=500000;
|
||||||
|
|
||||||
for(i=0;(i<sizeof(bands)/sizeof(bands[0]))&&(srate>bands[i]);i++)
|
for(i=0;(i<sizeof(bands)/sizeof(bands[0]))&&(srate>bands[i]);i++)
|
||||||
;
|
;
|
||||||
/* first, check which sample rate is appropriate: 45, 60 80 or 90 MHz,
|
/* first, check which sample rate is appropriate: 45, 60 80 or 90 MHz,
|
||||||
and set the PLL accordingly (R07[1:0] Fclk, R06[7:4] PLLmult,
|
and set the PLL accordingly (R07[1:0] Fclk, R06[7:4] PLLmult,
|
||||||
R06[3:0] PLLphaseDetGain */
|
R06[3:0] PLLphaseDetGain */
|
||||||
tmp=cx24110_readreg(state,0x07)&0xfc;
|
tmp=cx24110_readreg(state,0x07)&0xfc;
|
||||||
if(srate<90999000UL/4) { /* sample rate 45MHz*/
|
if(srate<90999000UL/4) { /* sample rate 45MHz*/
|
||||||
cx24110_writereg(state,0x07,tmp);
|
cx24110_writereg(state,0x07,tmp);
|
||||||
cx24110_writereg(state,0x06,0x78);
|
cx24110_writereg(state,0x06,0x78);
|
||||||
fclk=90999000UL/2;
|
fclk=90999000UL/2;
|
||||||
} else if(srate<60666000UL/2) { /* sample rate 60MHz */
|
} else if(srate<60666000UL/2) { /* sample rate 60MHz */
|
||||||
cx24110_writereg(state,0x07,tmp|0x1);
|
cx24110_writereg(state,0x07,tmp|0x1);
|
||||||
cx24110_writereg(state,0x06,0xa5);
|
cx24110_writereg(state,0x06,0xa5);
|
||||||
fclk=60666000UL;
|
fclk=60666000UL;
|
||||||
} else if(srate<80888000UL/2) { /* sample rate 80MHz */
|
} else if(srate<80888000UL/2) { /* sample rate 80MHz */
|
||||||
cx24110_writereg(state,0x07,tmp|0x2);
|
cx24110_writereg(state,0x07,tmp|0x2);
|
||||||
cx24110_writereg(state,0x06,0x87);
|
cx24110_writereg(state,0x06,0x87);
|
||||||
fclk=80888000UL;
|
fclk=80888000UL;
|
||||||
} else { /* sample rate 90MHz */
|
} else { /* sample rate 90MHz */
|
||||||
cx24110_writereg(state,0x07,tmp|0x3);
|
cx24110_writereg(state,0x07,tmp|0x3);
|
||||||
cx24110_writereg(state,0x06,0x78);
|
cx24110_writereg(state,0x06,0x78);
|
||||||
fclk=90999000UL;
|
fclk=90999000UL;
|
||||||
};
|
};
|
||||||
dprintk("cx24110 debug: fclk %d Hz\n",fclk);
|
dprintk("cx24110 debug: fclk %d Hz\n",fclk);
|
||||||
/* we need to divide two integers with approx. 27 bits in 32 bit
|
/* we need to divide two integers with approx. 27 bits in 32 bit
|
||||||
arithmetic giving a 25 bit result */
|
arithmetic giving a 25 bit result */
|
||||||
/* the maximum dividend is 90999000/2, 0x02b6446c, this number is
|
/* the maximum dividend is 90999000/2, 0x02b6446c, this number is
|
||||||
also the most complex divisor. Hence, the dividend has,
|
also the most complex divisor. Hence, the dividend has,
|
||||||
assuming 32bit unsigned arithmetic, 6 clear bits on top, the
|
assuming 32bit unsigned arithmetic, 6 clear bits on top, the
|
||||||
divisor 2 unused bits at the bottom. Also, the quotient is
|
divisor 2 unused bits at the bottom. Also, the quotient is
|
||||||
always less than 1/2. Borrowed from VES1893.c, of course */
|
always less than 1/2. Borrowed from VES1893.c, of course */
|
||||||
|
|
||||||
tmp=srate<<6;
|
tmp=srate<<6;
|
||||||
BDRI=fclk>>2;
|
BDRI=fclk>>2;
|
||||||
ratio=(tmp/BDRI);
|
ratio=(tmp/BDRI);
|
||||||
|
|
||||||
tmp=(tmp%BDRI)<<8;
|
tmp=(tmp%BDRI)<<8;
|
||||||
ratio=(ratio<<8)+(tmp/BDRI);
|
ratio=(ratio<<8)+(tmp/BDRI);
|
||||||
|
|
||||||
tmp=(tmp%BDRI)<<8;
|
tmp=(tmp%BDRI)<<8;
|
||||||
ratio=(ratio<<8)+(tmp/BDRI);
|
ratio=(ratio<<8)+(tmp/BDRI);
|
||||||
|
|
||||||
tmp=(tmp%BDRI)<<1;
|
tmp=(tmp%BDRI)<<1;
|
||||||
ratio=(ratio<<1)+(tmp/BDRI);
|
ratio=(ratio<<1)+(tmp/BDRI);
|
||||||
|
|
||||||
dprintk("srate= %d (range %d, up to %d)\n", srate,i,bands[i]);
|
dprintk("srate= %d (range %d, up to %d)\n", srate,i,bands[i]);
|
||||||
dprintk("fclk = %d\n", fclk);
|
dprintk("fclk = %d\n", fclk);
|
||||||
dprintk("ratio= %08x\n", ratio);
|
dprintk("ratio= %08x\n", ratio);
|
||||||
|
|
||||||
cx24110_writereg(state, 0x1, (ratio>>16)&0xff);
|
cx24110_writereg(state, 0x1, (ratio>>16)&0xff);
|
||||||
cx24110_writereg(state, 0x2, (ratio>>8)&0xff);
|
cx24110_writereg(state, 0x2, (ratio>>8)&0xff);
|
||||||
cx24110_writereg(state, 0x3, (ratio)&0xff);
|
cx24110_writereg(state, 0x3, (ratio)&0xff);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,48 +324,48 @@ int cx24110_pll_write (struct dvb_frontend* fe, u32 data)
|
||||||
|
|
||||||
dprintk("cx24110 debug: cx24108_write(%8.8x)\n",data);
|
dprintk("cx24110 debug: cx24108_write(%8.8x)\n",data);
|
||||||
|
|
||||||
cx24110_writereg(state,0x6d,0x30); /* auto mode at 62kHz */
|
cx24110_writereg(state,0x6d,0x30); /* auto mode at 62kHz */
|
||||||
cx24110_writereg(state,0x70,0x15); /* auto mode 21 bits */
|
cx24110_writereg(state,0x70,0x15); /* auto mode 21 bits */
|
||||||
|
|
||||||
/* if the auto tuner writer is still busy, clear it out */
|
/* if the auto tuner writer is still busy, clear it out */
|
||||||
while (cx24110_readreg(state,0x6d)&0x80)
|
while (cx24110_readreg(state,0x6d)&0x80)
|
||||||
cx24110_writereg(state,0x72,0);
|
cx24110_writereg(state,0x72,0);
|
||||||
|
|
||||||
/* write the topmost 8 bits */
|
/* write the topmost 8 bits */
|
||||||
cx24110_writereg(state,0x72,(data>>24)&0xff);
|
cx24110_writereg(state,0x72,(data>>24)&0xff);
|
||||||
|
|
||||||
/* wait for the send to be completed */
|
/* wait for the send to be completed */
|
||||||
while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
|
while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
|
||||||
;
|
;
|
||||||
|
|
||||||
/* send another 8 bytes */
|
/* send another 8 bytes */
|
||||||
cx24110_writereg(state,0x72,(data>>16)&0xff);
|
cx24110_writereg(state,0x72,(data>>16)&0xff);
|
||||||
while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
|
while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
|
||||||
;
|
;
|
||||||
|
|
||||||
/* and the topmost 5 bits of this byte */
|
/* and the topmost 5 bits of this byte */
|
||||||
cx24110_writereg(state,0x72,(data>>8)&0xff);
|
cx24110_writereg(state,0x72,(data>>8)&0xff);
|
||||||
while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
|
while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
|
||||||
;
|
;
|
||||||
|
|
||||||
/* now strobe the enable line once */
|
/* now strobe the enable line once */
|
||||||
cx24110_writereg(state,0x6d,0x32);
|
cx24110_writereg(state,0x6d,0x32);
|
||||||
cx24110_writereg(state,0x6d,0x30);
|
cx24110_writereg(state,0x6d,0x30);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cx24110_initfe(struct dvb_frontend* fe)
|
static int cx24110_initfe(struct dvb_frontend* fe)
|
||||||
{
|
{
|
||||||
struct cx24110_state *state = fe->demodulator_priv;
|
struct cx24110_state *state = fe->demodulator_priv;
|
||||||
/* fixme (low): error handling */
|
/* fixme (low): error handling */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
dprintk("%s: init chip\n", __FUNCTION__);
|
dprintk("%s: init chip\n", __FUNCTION__);
|
||||||
|
|
||||||
for(i=0;i<sizeof(cx24110_regdata)/sizeof(cx24110_regdata[0]);i++) {
|
for(i=0;i<sizeof(cx24110_regdata)/sizeof(cx24110_regdata[0]);i++) {
|
||||||
cx24110_writereg(state, cx24110_regdata[i].reg, cx24110_regdata[i].data);
|
cx24110_writereg(state, cx24110_regdata[i].reg, cx24110_regdata[i].data);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (state->config->pll_init) state->config->pll_init(fe);
|
if (state->config->pll_init) state->config->pll_init(fe);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
driver for LSI L64781 COFDM demodulator
|
driver for LSI L64781 COFDM demodulator
|
||||||
|
|
||||||
Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH
|
Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH
|
||||||
Marko Kohtala <marko.kohtala@luukku.com>
|
Marko Kohtala <marko.kohtala@luukku.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -433,7 +433,7 @@ static int l64781_init(struct dvb_frontend* fe)
|
||||||
{
|
{
|
||||||
struct l64781_state* state = fe->demodulator_priv;
|
struct l64781_state* state = fe->demodulator_priv;
|
||||||
|
|
||||||
reset_and_configure (state);
|
reset_and_configure (state);
|
||||||
|
|
||||||
/* Power up */
|
/* Power up */
|
||||||
l64781_writereg (state, 0x3e, 0xa5);
|
l64781_writereg (state, 0x3e, 0xa5);
|
||||||
|
@ -456,9 +456,9 @@ static int l64781_init(struct dvb_frontend* fe)
|
||||||
l64781_writereg (state, 0x0d, 0x8c);
|
l64781_writereg (state, 0x0d, 0x8c);
|
||||||
|
|
||||||
/* With ppm=8000, it seems the DTR_SENSITIVITY will result in
|
/* With ppm=8000, it seems the DTR_SENSITIVITY will result in
|
||||||
value of 2 with all possible bandwidths and guard
|
value of 2 with all possible bandwidths and guard
|
||||||
intervals, which is the initial value anyway. */
|
intervals, which is the initial value anyway. */
|
||||||
/*l64781_writereg (state, 0x19, 0x92);*/
|
/*l64781_writereg (state, 0x19, 0x92);*/
|
||||||
|
|
||||||
/* Everything is two's complement, soft bit and CSI_OUT too */
|
/* Everything is two's complement, soft bit and CSI_OUT too */
|
||||||
l64781_writereg (state, 0x1e, 0x09);
|
l64781_writereg (state, 0x1e, 0x09);
|
||||||
|
@ -477,10 +477,10 @@ static int l64781_init(struct dvb_frontend* fe)
|
||||||
static int l64781_get_tune_settings(struct dvb_frontend* fe,
|
static int l64781_get_tune_settings(struct dvb_frontend* fe,
|
||||||
struct dvb_frontend_tune_settings* fesettings)
|
struct dvb_frontend_tune_settings* fesettings)
|
||||||
{
|
{
|
||||||
fesettings->min_delay_ms = 4000;
|
fesettings->min_delay_ms = 4000;
|
||||||
fesettings->step_size = 0;
|
fesettings->step_size = 0;
|
||||||
fesettings->max_drift = 0;
|
fesettings->max_drift = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void l64781_release(struct dvb_frontend* fe)
|
static void l64781_release(struct dvb_frontend* fe)
|
||||||
|
@ -522,7 +522,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
|
||||||
|
|
||||||
/* The chip always responds to reads */
|
/* The chip always responds to reads */
|
||||||
if (i2c_transfer(state->i2c, msg, 2) != 2) {
|
if (i2c_transfer(state->i2c, msg, 2) != 2) {
|
||||||
dprintk("No response to read on I2C bus\n");
|
dprintk("No response to read on I2C bus\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
|
||||||
|
|
||||||
/* Reading the POWER_DOWN register always returns 0 */
|
/* Reading the POWER_DOWN register always returns 0 */
|
||||||
if (reg0x3e != 0) {
|
if (reg0x3e != 0) {
|
||||||
dprintk("Device doesn't look like L64781\n");
|
dprintk("Device doesn't look like L64781\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -540,7 +540,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
|
||||||
|
|
||||||
/* Responds to all reads with 0 */
|
/* Responds to all reads with 0 */
|
||||||
if (l64781_readreg(state, 0x1a) != 0) {
|
if (l64781_readreg(state, 0x1a) != 0) {
|
||||||
dprintk("Read 1 returned unexpcted value\n");
|
dprintk("Read 1 returned unexpcted value\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -549,7 +549,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
|
||||||
|
|
||||||
/* Responds with register default value */
|
/* Responds with register default value */
|
||||||
if (l64781_readreg(state, 0x1a) != 0xa1) {
|
if (l64781_readreg(state, 0x1a) != 0xa1) {
|
||||||
dprintk("Read 2 returned unexpcted value\n");
|
dprintk("Read 2 returned unexpcted value\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
driver for LSI L64781 COFDM demodulator
|
driver for LSI L64781 COFDM demodulator
|
||||||
|
|
||||||
Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH
|
Copyright (C) 2001 Holger Waechtler for Convergence Integrated Media GmbH
|
||||||
Marko Kohtala <marko.kohtala@luukku.com>
|
Marko Kohtala <marko.kohtala@luukku.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -301,10 +301,10 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe,
|
||||||
static u8 lgdt3303_8vsb_44_data[] = {
|
static u8 lgdt3303_8vsb_44_data[] = {
|
||||||
0x04, 0x00,
|
0x04, 0x00,
|
||||||
0x0d, 0x40,
|
0x0d, 0x40,
|
||||||
0x0e, 0x87,
|
0x0e, 0x87,
|
||||||
0x0f, 0x8e,
|
0x0f, 0x8e,
|
||||||
0x10, 0x01,
|
0x10, 0x01,
|
||||||
0x47, 0x8b };
|
0x47, 0x8b };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Array of byte pairs <address, value>
|
* Array of byte pairs <address, value>
|
||||||
|
|
|
@ -554,7 +554,7 @@ static int mt312_set_frontend(struct dvb_frontend* fe,
|
||||||
if ((ret = mt312_write(state, SYM_RATE_H, buf, sizeof(buf))) < 0)
|
if ((ret = mt312_write(state, SYM_RATE_H, buf, sizeof(buf))) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
mt312_reset(state, 0);
|
mt312_reset(state, 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -695,7 +695,7 @@ static struct dvb_frontend_ops vp310_mt312_ops = {
|
||||||
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 |
|
FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 |
|
||||||
FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
|
FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 |
|
||||||
FE_CAN_FEC_AUTO | FE_CAN_QPSK | FE_CAN_MUTE_TS |
|
FE_CAN_FEC_AUTO | FE_CAN_QPSK | FE_CAN_MUTE_TS |
|
||||||
FE_CAN_RECOVER
|
FE_CAN_RECOVER
|
||||||
},
|
},
|
||||||
|
|
||||||
.release = mt312_release,
|
.release = mt312_release,
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче